-
Notifications
You must be signed in to change notification settings - Fork 12
/
webpack.config.js
41 lines (40 loc) · 1.22 KB
/
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
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/providers.ts',
module: {
rules: [{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
}, ],
},
devtool: 'source-map',
resolve: {
extensions: ['.tsx', '.ts', '.js'],
fallback: {
util: require.resolve('util/'),
path: require.resolve('path-browserify'),
buffer: require.resolve('buffer/'),
os: require.resolve('os-browserify/browser'),
url: require.resolve('url/'),
stream: require.resolve('stream-browserify'),
https: require.resolve('https-browserify'),
assert: require.resolve('assert/'),
http: require.resolve('stream-http'),
fs: false,
events: require.resolve("events/"),
},
},
mode: 'development',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'public'),
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: path.resolve(path.join(__dirname, 'node_modules/process/browser')),
}),
],
};