我对webpack的小块有意见
所以我将webpack配置为编译到dist文件夹,然后在那里有buldle.js和1.bundle.js
但是浏览器不会检索1.bundle.js,因为文件的路径是错误的
在chrome devtool >网络标签中
bundle.js = http://localhost:3000/dist/bundle.js
但是..。1.bundle.js = http://localhost:3000/1.bundle.js
怎么啦?
发布于 2016-01-17 16:39:57
我找到了答案,我们需要指定publicPath。Webpack not loading partial files from the same root
{
entry: 'src/main.js',
output: {
path: 'dist/',
publicPath: '/dist/'
}
}https://stackoverflow.com/questions/34836433
复制相似问题