-
Notifications
You must be signed in to change notification settings - Fork 247
/
Copy pathwebpack.config.js
32 lines (31 loc) · 976 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'use strict';
// Webpack:https://www.yuque.com/easy-team/easywebpack
// Egg Vue html https://www.yuque.com/easy-team/egg-vue/html
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackHardiskPlugin = require('html-webpack-harddisk-plugin');
module.exports = {
target: 'web',
entry: {
'html/simple': 'app/web/page/html/simple.vue',
'html/spa': 'app/web/page/html/spa.js'
},
plugins: [
{ imagemini: false },
new HtmlWebpackPlugin({
alwaysWriteToDisk: true,
chunks: ['runtime','common', 'html/spa'],
filename: '../view/spa.tpl',
template: './app/web/view/layout.tpl'
}),
new HtmlWebpackPlugin({
alwaysWriteToDisk: true,
chunks: ['runtime','common', 'html/simple'],
filename: '../view/simple.tpl',
template: './app/web/view/layout.tpl'
}),
new HtmlWebpackHardiskPlugin({
outputPath: path.resolve(__dirname, 'app/view')
})
]
};