mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 08:06:13 +00:00
perf: load JS modules on first use instead of at startup
This commit is contained in:
@@ -33,4 +33,14 @@ if (process.env.BULWARK_MODULE_TIMINGS) {
|
||||
}
|
||||
}
|
||||
|
||||
// Evaluate a module when it is first used instead of all of them before the
|
||||
// first render. Expo's default leaves this off; React Native's own template
|
||||
// turns it on. Side-effect-only imports (`import './x'`) still run in place.
|
||||
config.transformer.getTransformOptions = async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: true,
|
||||
inlineRequires: true,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = config;
|
||||
|
||||
Reference in New Issue
Block a user