-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
25 lines (22 loc) · 935 Bytes
/
webpack.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
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
const ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
module.exports = async function (env, argv) {
const isDev = env.mode === 'development';
const envConfig = isDev?env:{
...env,
// Passing true will enable the default Workbox + Expo SW configuration.
offline: true
}
const config = await createExpoWebpackConfigAsync(envConfig, argv);
config.resolve.alias['react-native-maps'] = 'react-native-web-maps';
config.resolve.alias['react-native-linear-gradient'] = 'react-native-web-linear-gradient';
// config.resolve.alias['victory-native'] = 'victory';
// config.resolve.alias['react-native-svg'] = 'svgs';
// Use the React refresh plugin in development mode
if (isDev) {
config.plugins.push(
new ReactRefreshPlugin()
);
}
return config;
};