-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.config.js
41 lines (40 loc) · 952 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
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
main: "./src/main.js",
detector: "./src/detector.js",
background: "./src/background.js",
popup: "./src/popup.js",
devtools: "./src/devtools.js",
framework_pane: "./src/framework_pane.js"
},
devtool: 'source-map',
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.(png|jpg|jpeg)$/,
loader: 'file-loader'
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
}
]
},
output: {
filename: '[name].js',
path: './build'
},
plugins: [
new CopyWebpackPlugin([
{ from: './resources/*.png', to: './', flatten: true },
{ from: './resources/extension/**', to: './', flatten: true },
{ from: './resources/apps/**', to: './apps', flatten: true },
])
]
};