-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.config.js
53 lines (46 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Packages
const webpack = require('webpack'),
path = require('path');
// Webpack Plugins
const CopyPlugin = require('copy-webpack-plugin');
// Paths
const srcPath = path.join(__dirname, 'src'),
distPath = path.join(__dirname, 'dev-build'),
node_modulesPath = path.join(__dirname, 'node_modules')
module.exports = {
mode: 'development',
resolve: {
alias: {
src: srcPath
}
},
context: srcPath,
entry: {
content: './content/',
background: './background/',
// popup: './popup/',
options: './options.js',
setupPage: './setupPage.js'
},
output: {
path: distPath,
filename: './[name].js'
},
module: {
rules: [
{ test: /\.styl$/, use: ['style-loader', 'css-loader', 'stylus-loader'], exclude: /node_modules/ }
]
},
plugins: [
new CopyPlugin([
'manifest.json',
'html/**/*',
'assets/**/*'
], {
ignore: [
'**/*.psd'
]
})
],
devtool: '#inline-cheap-source-map'
}