forked from cerc-io/laconic-wallet-web
640155aa4a
* Basic setup for react native web * Comment unsupported react-native code * Add interface for keychain methods * Fix storeNetworkData method * Use mui dialog component * Modify key store file name * Fix add network and edit network screens * Fix sign message screen * Use light theme --------- Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
// TODO: Use Typescript
|
|
|
|
module.exports = function override(config, env) {
|
|
config.module.rules.push({
|
|
test: /\.js$/,
|
|
exclude: /node_modules[/\\](?!react-native-vector-icons)/,
|
|
use: {
|
|
loader: "babel-loader",
|
|
options: {
|
|
// Disable reading babel configuration
|
|
babelrc: false,
|
|
configFile: false,
|
|
|
|
// The configuration for compilation
|
|
presets: [
|
|
["@babel/preset-env", { useBuiltIns: "usage", "corejs": "3" }],
|
|
"@babel/preset-react",
|
|
"@babel/preset-flow",
|
|
"@babel/preset-typescript",
|
|
],
|
|
plugins: [
|
|
"@babel/plugin-proposal-class-properties",
|
|
"@babel/plugin-proposal-object-rest-spread"
|
|
]
|
|
}
|
|
}
|
|
});
|
|
|
|
config.module.rules.push({
|
|
test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/,
|
|
type: 'asset/resource'
|
|
})
|
|
|
|
config.resolve.fallback = {
|
|
crypto: require.resolve("crypto-browserify"),
|
|
stream: require.resolve("stream-browserify"),
|
|
}
|
|
|
|
config.resolve.alias['react-native$'] = require.resolve('react-native-web');
|
|
|
|
return config;
|
|
};
|