-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (36 loc) · 916 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
var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = {
entry: {
content: './src/content.js',
background: './src/background.js',
'browser-action': './src/browser-action.js'
},
output: {
filename: 'js/[name].reddithotswap.js',
path: path.resolve(__dirname, 'build')
},
plugins: [
new CopyWebpackPlugin([
{ from: './src/manifests/chrome.json', to: 'manifest.json' },
{ from: './src/assets/reddithotswap_16.png', to: 'icons/' },
{ from: './src/assets/reddithotswap_48.png', to: 'icons/' },
{ from: './src/assets/reddithotswap_128.png', to: 'icons/' }
])
],
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
},
{ test: /\.html$/, loader: "raw-loader" }
],
},
stats: {
colors: true
}
};