配置文件是
module.exports = {
entry: {
app: ['./app/main.js']
},
output: {
path: './build',
publicPath: "/assets/",
filename: 'bundle.js'
}
};
这样只在内存中生成虚拟的 http://localhost:8080/assets/bundle.js
用 提示404 怎么样才能生成实际的buille.js 这样页面中引用 script src="bundle.js" 就行了
回复 (2)
V
/assets/bundle.js
Q
filename: 'bundle-[name].js'
参与回复
登录后即可参与回复。登录