-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
24 lines (23 loc) · 1010 Bytes
/
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
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
devtool: "source-map",
mode: 'development',
entry: {
background: path.join(__dirname, './src/extension/background/index.js'),
['content-script']: path.join(__dirname, './src/extension/content-script/index.js'),
},
output: {
filename: '[name]/index.js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [
new CopyPlugin([
{ from: 'src/extension/manifest.json', to: 'manifest.json'},
{ from: 'src/extension/icons/default-icon.png', to: 'icons/default-icon.png'},
{ from: 'src/extension/icons/active-icon.png', to: 'icons/active-icon.png'},
{ from: 'src/extension/web-accessible-resources/glovy-ui.html', to: 'web-accessible-resources/glovy-ui.html'},
{ from: 'src/extension/web-accessible-resources/glovy-ui.css', to: 'web-accessible-resources/glovy-ui.css'},
])
],
};