-
Notifications
You must be signed in to change notification settings - Fork 9
/
craco.config.js
44 lines (43 loc) · 1.44 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
38
39
40
41
42
43
44
const webpack = require("webpack");
module.exports = {
webpack: {
configure: (webpackConfig) => {
return {
...webpackConfig,
resolve: {
...webpackConfig.resolve,
fallback: {
"@solana/web3.js": require.resolve("@solana/web3.js"),
stream: require.resolve("stream-browserify"),
buffer: require.resolve("buffer"),
},
},
module: {
...webpackConfig.module,
rules: [
...webpackConfig.module.rules,
{
test: /\.mjsx?$/,
include: /node_modules/,
type: "javascript/auto",
},
],
},
// @terra-money/terra.proto throwns a large number of soruce map
// errors.
ignoreWarnings: [/Failed to parse source map/],
plugins: [
...webpackConfig.plugins,
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
],
};
},
},
style: {
postcssOptions: {
plugins: [require("tailwindcss"), require("autoprefixer")],
},
},
};