webpack在用dev-server的时候怎么配置多入口文件?
关注者
10被浏览
7,633登录后你可以
不限量看优质回答私信答主深度交流精彩内容一键收藏
多个文件入口你的代码不就是了吗?
entry: {
Profile: './profile.js',
Feed: './feed.js'
}
webpack-dev-server 不一定要在 entry 中配置,也可以在 package.json 中配置(可参考
https://github.com/cobish/cobish.github.io/blob/master/package.json#L6):
{
"scripts": {
"dev": "webpack-dev-server --hot --inline"
}
}