-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (30 loc) · 995 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
26
27
28
29
30
31
32
33
const createExpoWebpackConfigAsync = require("@expo/webpack-config");
// const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(
{
...env,
// Passing true will enable the default Workbox + Expo SW configuration.
offline: env.mode === "production",
removeUnusedImportExports: true,
},
argv
);
// config.resolve.alias = {
// ...config.resolve.alias,
// // Use Preact aliases
// react$: "preact/compat",
// "react-dom$": "preact/compat",
// // Fix the responder system which react-native-web depends on
// "react-dom/unstable-native-dependencies$": "preact-responder-event-plugin",
// };
// if (env.mode === "production") {
// config.plugins.push(
// new BundleAnalyzerPlugin({
// path: "web-report",
// })
// );
// }
// Customize the config before returning it.
return config;
};