(作废)整合react-weui时报错
来源:3-11 使用 Babel 处理 ES6 语法(1)
慕神0028795
2019-03-21
.babelrc配置
{
"presets": [
["@babel/preset-env", { "useBuiltIns": "entry" }],
"@babel/preset-react"
]
}
报错如下:
C:UsersAdministratorDesktopdemo
ode_modules_weui@1.1.0@weuidiststyleweui.css:6
html {
^
SyntaxError: Unexpected token {
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
[nodemon] app crashed - waiting for file changes before starting...
webpack is watching the files…
With `useBuiltIns` option, required direct setting of `corejs` option
写回答
1回答
-
022019-03-22
相似问题