-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.config.js
46 lines (45 loc) · 1.1 KB
/
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
38
39
40
41
42
43
44
45
46
const path = require('path')
const glob = require('glob')
module.exports = {
// entry: './plugin/index.js',
entry: [
'./plugin/index.js',
...glob.sync('./plugin/series/*.js'),
...glob.sync('./plugin/utils/*.js')
],
output: {
path: path.resolve(__dirname, 'plugin/build'),
// filename: 'index.min.js'
filename: 'index.min.js'
// libraryTarget: 'umd',
// library: 'WxCanvas2d'
},
watch: true,
watchOptions: {
aggregateTimeout: 300,
ignored: [
'./.vscode',
'./doc',
'./docs',
'./miniprogram',
'./node_modules',
'./plugin/index.min.js',
'./plugin/index.min.js.map',
'./plugin/build/'
],
poll: 1000
},
devtool: 'source-map',
module: {
// rules: [
// {
// test: /\.js$/,
// use: {
// loader: 'babel-loader'
// },
// exclude: '/node_modules/'
// }
// ]
},
plugins: []
}