vscode打包时,遇到Failed to load resource: net::ERR_FILE_NOT_FOUND怎样解决
在使用vscode打包时遇到了如下问题:
Failed to load resource: net::ERR_FILE_NOT_FOUND
出现这个问题是因为在webpack.config.js文件的输出路径的文件名filename中的bundle.js名称没有写对,如果不是bundle.js,就会报错,将文件名改为bundle.js,运行成功。
module.exports = {
entry: './src/main.js',
output: {
path: path.join(__dirname, './dist'),
filename: 'bundel.js'
}
}