generated from valora-inc/typescript-app-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig-overrides.js
28 lines (26 loc) · 922 Bytes
/
config-overrides.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
module.exports = function override(config) {
const fallback = config.resolve.fallback || {}
Object.assign(fallback, {
// can assign fallbacks/polyfills here if webpack errors occur due to missing node.js core modules
// see instructions here: https://web3auth.io/docs/troubleshooting/webpack-issues#react-create-react-app
})
config.resolve.fallback = fallback
// can uncomment to polyfill buffer and process
// config.plugins = (config.plugins || []).concat([
// new webpack.ProvidePlugin({
// process: "process/browser",
// Buffer: ["buffer", "Buffer"],
// }),
// ]);
// ignore expected warnings from metamask utils
config.ignoreWarnings = [/Failed to parse source map/]
config.module.rules.push({
test: /\.(js|mjs|jsx)$/,
enforce: 'pre',
loader: require.resolve('source-map-loader'),
resolve: {
fullySpecified: false,
},
})
return config
}