forked from opt-out-tools/opt-out
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (36 loc) · 1.04 KB
/
webpack.config.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
35
36
37
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
// Content
'content/opt-out-ext.js': './src/content/opt-out-ext.js',
// Popup
'popup/popup-main.js': './src/popup/popup-main.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name]'
},
module: {
rules: []
},
optimization: {
minimize: false
},
// Copies static assets to correct places
plugins: [
new CopyPlugin([
// Extension Static Assests
{ from: './src/index-1.html', to: './index-1.html' },
{ from: './src/manifest.json', to: './manifest.json' },
{ from: './src/README.md', to: './README.md' },
{ from: './src/icons', to: './icons' },
// Content Static Assets
{ from: './src/content/opt-out.css', to: './content/opt-out.css' },
// Popup Static Assets
{ from: './src/popup/assets', to: './popup/assets' },
{ from: './src/popup/popup.html', to: './popup/popup.html' }
])
],
devtool: 'inline-source-map'
};