-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
42 lines (41 loc) · 1.18 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
const path = require('path');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: {
'bundle.js': [
path.resolve(__dirname, 'controller/require-babel-polyfill.js'),
path.resolve(__dirname, 'controller/custom-fields.js'),
path.resolve(__dirname, 'controller/postcode.js'),
path.resolve(__dirname, 'model/custom-fields/button-fields.js'),
path.resolve(__dirname, 'model/custom-fields/custom-types/text-fields.js'),
path.resolve(__dirname, 'model/custom-fields/custom-types/address-fields.js'),
path.resolve(__dirname, 'model/custom-fields/custom-types/radio-fields.js'),
path.resolve(__dirname, 'model/custom-fields/custom-types/check-fields.js'),
path.resolve(__dirname, 'model/custom-fields/custom-types/select-fields.js')
],
'bundle-main.js': [
path.resolve(__dirname, 'controller/file-info.js')
]
},
plugins: [
new UglifyJSPlugin()
],
output: {
filename: '[name]',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['babel-preset-env']
}
}
}
]
}
}