-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.prod.js
34 lines (31 loc) · 983 Bytes
/
webpack.prod.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
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { merge } = require('webpack-merge');
const {
config,
manifest
} = require('./webpack.common.js');
// currently this is necessary because v-html is used to display dictionary info in the word list
manifest.content_security_policy = "script-src 'self' 'unsafe-eval'; object-src 'self'"
module.exports = merge(config, {
mode: 'production',
devtool: 'source-map',
output: {
path: __dirname + '/build',
},
plugins: [
new CopyWebpackPlugin({
patterns: [{
from: './node_modules/react/umd/react.production.min.js',
to: 'react.js',
},
{
from: './node_modules/react-dom/umd/react-dom.production.min.js',
to: 'react-dom.js',
},
{
from: './app/pages/options.prod.html',
to: 'options.html',
}]
}),
]
});