forked from capsule-org/react-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcraco.config.js
More file actions
35 lines (33 loc) · 881 Bytes
/
craco.config.js
File metadata and controls
35 lines (33 loc) · 881 Bytes
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
const webpack = require('webpack');
module.exports = {
webpack: {
plugins: {
add: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
],
},
configure: webpackConfig => {
// ts-loader is required to reference external typescript projects/files (non-transpiled)
webpackConfig.module.rules.push({
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
transpileOnly: true,
configFile: 'tsconfig.json',
},
})
webpackConfig.resolve.fallback = {
// crypto and stream needed for @celo/utils
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
"url": false,
"zlib": false,
"https": false,
"http": false,
}
return webpackConfig;
},
}
};