-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (37 loc) · 961 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
33
34
35
36
37
var htmlWebpackPlugin = require('html-webpack-plugin');
var home = __dirname + '/src/cxmooc-tools';
module.exports = {
entry: {
mooc: home + '/mooc.js',
start: home + '/start.js',
background: home + '/background.js',
popup: home + '/popup.js'
},
output: {
path: __dirname + '/build/cxmooc-tools/src',
filename: '[name].js'
},
plugins: [
new htmlWebpackPlugin({
filename: __dirname + '/build/cxmooc-tools/src/popup.html',
template: home + '/html/popup.html',
inject: 'head',
title: '弹出页面',
minify: {
removeComments: true
},
chunks: ['popup']
})
],
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
}
]
},
resolve: {
extensions: ['.ts', '.js']
}
}