-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.js
32 lines (30 loc) · 901 Bytes
/
webpack.dev.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
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { merge } = require('webpack-merge');
const {
config,
manifest
} = require('./webpack.common.js');
manifest.content_security_policy = "script-src 'self' http://localhost:* 'unsafe-eval'; object-src 'self'"
module.exports = merge(config, {
mode: 'development',
devtool: 'eval-source-map',
output: {
path: __dirname + '/dist',
},
plugins: [
new CopyWebpackPlugin({
patterns: [{
from: './node_modules/react/umd/react.development.js',
to: 'react.js',
},
{
from: './node_modules/react-dom/umd/react-dom.development.js',
to: 'react-dom.js',
},
{
from: './app/pages/options.dev.html',
to: 'options.html',
}]
}),
]
});