-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.production.js
More file actions
42 lines (38 loc) · 1.05 KB
/
webpack.config.production.js
File metadata and controls
42 lines (38 loc) · 1.05 KB
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
const resolve = require('path').resolve;
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const appConfig = require('./pmt-app/webpack.config.production');
module.exports = function(env) {
return webpackMerge(appConfig(env), {
output: {
path: resolve(__dirname, 'dist/app/assets')
},
plugins: [
new CleanWebpackPlugin([resolve(__dirname, 'dist')]),
new CopyWebpackPlugin([
{
from: '../cfg',
to: '../../cfg'
},
{
from: '../server.js',
to: '../../'
},
{
from: '../config.js',
to: '../../'
},
{
from: '../package.json',
to: '../../package.json'
},
{
from: '../yarn.lock',
to: '../../'
}
])
]
})
}