-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.prod.js
More file actions
38 lines (35 loc) · 825 Bytes
/
webpack.prod.js
File metadata and controls
38 lines (35 loc) · 825 Bytes
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
const config = require('./webpack.config.js')
const merge = require('webpack-merge')
const path = require('path')
delete config.entry.bootstrap
const productionConfig = merge(config, {
mode: 'production',
output: {
path: path.resolve(__dirname, 'public'),
filename: 'v1/[name].js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
['@babel/preset-env', {
modules: false,
targets: {
ie: 11
}
}]
]
// plugins: ["@babel/plugin-transform-runtime"]
}
}
}
]
}
})
module.exports = productionConfig