-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
30 lines (29 loc) · 920 Bytes
/
webpack.config.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
const webpackProductionConfig = require('./webpack.config');
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const ExtensionReloader = require('webpack-extension-reloader');
module.exports = {
...webpackProductionConfig,
mode: 'development', // The plugin is activated only if mode is set to development
watch: true,
plugins: [
new ExtensionReloader({
manifest: path.resolve(__dirname, './src/manifest.json')
}),
new CopyPlugin([
{
from: './src/manifest.json',
transform(content) {
return JSON.stringify({
...JSON.parse(content),
// EVAL is required for hot reloading
content_security_policy:
"script-src 'self' 'unsafe-eval'; object-src 'self'"
});
}
},
{ from: './src/tableRowDisabler.css' },
{ from: './src/img', to: 'img' }
])
]
};