-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.config.js
34 lines (32 loc) · 828 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
const webpack = require('webpack');
const path = require('path');
var options = {
mode: 'development',
devtool: 'source-map',
entry: {
background: path.join(__dirname, 'src', 'background.js'),
options: path.join(__dirname, 'src', 'options.js'),
},
output: {
path: path.join(__dirname, 'build'),
filename: '[name].js',
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
],
resolve: {
fallback: {
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
timers: require.resolve('timers-browserify'),
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer'),
},
},
};
module.exports = options;