./config/index.js
中,我已更改以下标志:build: {
// other code...
devtool: '', // Previously it was set as '#source-map'
productionSourceMap: false, // Previously it was set as true
cssSourceMap: false, // Previously set as true
// other code...
}
我通过阅读webpack文档找到了解决方案,其中解释了设置的作用:https://webpack.js.org/configuration/devtool/#production
感谢各位将我引导到正确的方向。
node_modules
、src
和 theme
应该在文件夹结构中向上一级。因此,您必须修改指向这些文件的路径。
app.js
只能与 JS 可执行文件放在同一个文件夹中。