先上配置
{
test: /.js$/,
exclude: /node_modules/,
loader: “babel-loader”
}
{
“presets”: [
[
"@babel/preset-env",
{
“useBuiltIns”: “usage”
}
]
]
}
结果打包的时候报错
ERROR in ./src/js/Director.js
Module not found: Error: Can’t resolve ‘core-js/modules/es6.array.for-each’ in ‘/Users/szh/Documents/study/game/flybirdWebpack/src/js’
@ ./src/js/Director.js 2:0-44
@ ./src/main.js
ERROR in ./src/js/base/ResourcesLoader.js
Module not found: Error: Can’t resolve ‘core-js/modules/es6.array.is-array’ in ‘/Users/szh/Documents/study/game/flybirdWebpack/src/js/base’
@ ./src/js/base/ResourcesLoader.js 1:0-44
@ ./src/main.js
请问老师 这是什么问题 我还去babel官网去看了 没找到解决