本帖最后由 Eden.Sun 于 2024-5-29 13:58 编辑
************************************************最佳答案********************************************
解决了,原因是引用的一个包node_modules/canvg里面有拓展运算符,但是我这个loader解析不了,在webpack.base.conf.js配置rules就好了
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'), resolve('node_modules/canvg')]
},
|