-
Notifications
You must be signed in to change notification settings - Fork 0
/
craco.config.js
37 lines (36 loc) · 1.01 KB
/
craco.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
const webpack = require('webpack')
module.exports = {
webpack: {
alias: {
stream: 'stream-browserify',
https: 'agent-base',
},
configure: {
resolve: {
fallback: {
process: require.resolve('process/browser'),
zlib: require.resolve('browserify-zlib'),
stream: require.resolve('stream-browserify'),
util: require.resolve('util'),
buffer: require.resolve('buffer'),
asset: require.resolve('assert'),
crypto: require.resolve('crypto-browserify'),
http: false,
// https: false,
url: false,
os: false,
// http: require.resolve("stream-http"),
https: require.resolve('https-browserify'),
// url: require.resolve("url/"),
// os: require.resolve("os-browserify/browser"),
},
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: 'process/browser',
}),
],
},
},
}