entry: {
entry1: './view/pageA/a.js',
entry2: './view/pageB/b.js'
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js'
}
如上的配置,在dist目录中生成entry1.js和entry2.js
--dist
|-entry1.js
|-entry2.js
我现在希望的是,生成后保存原有入口文件的目录结构,如下
--dist
|-view
|-pageA
| |-entry1.js
|
|-pageB
|-entry2.js
那你可以这么配置: