我对 react 很陌生,并且不熟悉本地使用 react,所以我使用create-react-app
.
我正在尝试使用UIKit作为框架,但我无法让它工作。由于 UIKit 的 NPM 模块只支持它的 2.x 版本,我正在尝试使用它的 3.x(来自http://www.getuikit.com/)。我将 JS 文件 ( uikit.min.js
) 导入到我的一个组件中,但编译失败。
我包含import * as uikit from 'uikit.min.js';
在文件中,编译时会弹出:
./src/assets/js/uikit.min.js
Line 3: 'define' is not defined no-undef
Line 3: 'define' is not defined no-undef
Line 4: Unexpected use of 'location' no-restricted-globals
Line 4: Unexpected use of 'location' no-restricted-globals
Line 5: Unexpected use of 'location' no-restricted-globals
Line 5: 'DocumentTouch' is not defined no-undef
Line 5: 'MSGesture' is not defined no-undef
Search for the keywords to learn more about each error.
也许我做错了,但我怎样才能导入这个让我使用 UIkit v3?