@bacons/expo-metro-runtime
v2.0.1
Published
Tools for making experimental Metro bundler features work
Downloads
103
Maintainers
Readme
@bacons/expo-metro-runtime
Temporary utility package for using Metro on web with lazy loading and Fast Refresh.
Add the package to your npm dependencies
yarn add @bacons/expo-metro-runtime
Usage
To add web support to the runtime:
import "@bacons/expo-metro-runtime";
// Rest of your app...
To enable React Suspense in React Native for all platforms (dev only):
metro.config.js
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");
const config = getDefaultConfig(__dirname);
config.transformer = {
experimentalImportBundleSupport: true,
asyncRequireModulePath: path.resolve(
"@bacons/expo-metro-runtime/asyncRequire"
),
};
module.exports = config;