Open starInEcust opened 7 years ago
Also happens when using https://github.com/rofrischmann/fela/tree/master/packages/babel-plugin-fela
You need to set "modules": false"
in your .babelrc:
{
"presets": [
[
"@babel/preset-env", {
"useBuiltIns": "entry",
"debug": false,
"modules": false
}
]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-object-rest-spread",
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
And I needed to install babel-plugin-dynamic-import-node
我发现了一个神奇的bug
我把代码删减了一下发现在使用import plugin的时候使用如下代码会产生这个错误
写了个demo里面有webpack的配置和babel.rc