我想使用 webpack-dev-server 在一个 PORT 上托管多个入口点。我当前的配置如下:
entry: {
//Application specific code.
main: [
`webpack-dev-server/client?http://${config.HOST}:${config.PORT}`,
'webpack/hot/only-dev-server',
'./app/base.js',
'./app/main.js'
],
login: [
`webpack-dev-server/client?http://${config.HOST}:${config.PORT}`,
'webpack/hot/only-dev-server',
'./app/base.js',
'./app/login.js'
],
},
output: {
path: assetsPath,
publicPath: `http://${config.HOST}:${config.PORT}/public/dist/`,
chunkFilename: "[name].js",
filename: '[name].js',
},
但似乎它现在对我不起作用。有什么帮助吗?