-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
37 lines (35 loc) · 936 Bytes
/
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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
// see https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#configuration-overview
module.exports = {
babel: {
plugins: ['@babel/plugin-proposal-nullish-coalescing-operator']
},
webpack: {
plugins: [],
alias: {
'@src': path.resolve(__dirname, 'src')
},
// https://webpack.js.org/configuration
configure: webpackConfig => ({
...webpackConfig,
resolve: {
...webpackConfig.resolve,
modules: [...webpackConfig.resolve.modules],
fallback: {
fs: false,
tls: false,
net: false,
path: false,
zlib: false,
http: false,
https: false,
stream: false,
crypto: require.resolve('crypto-browserify'),
os: false,
assert: false
}
}
})
}
}