Skip to content

Commit ea9107e

Browse files
committed
chore: remove web reference
1 parent 4a233a6 commit ea9107e

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

demos/react-native-barebones-opsqlite/metro.config.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,5 @@ config.resolver.nodeModulesPaths = [
1818
config.resolver.disableHierarchicalLookup = true;
1919
config.resolver.unstable_enableSymlinks = true;
2020

21-
// Needed to make `@powersync/web/umd` imports work
22-
config.resolver.unstable_enablePackageExports = true;
23-
24-
config.resolver.resolveRequest = (context, moduleName, platform) => {
25-
if (platform === 'web') {
26-
if (['react-native-prompt-android', '@powersync/react-native'].includes(moduleName)) {
27-
return {
28-
type: 'empty'
29-
};
30-
}
31-
const mapping = { 'react-native': 'react-native-web', '@powersync/web': '@powersync/web/umd' };
32-
if (mapping[moduleName]) {
33-
console.log('remapping', moduleName);
34-
return context.resolveRequest(context, mapping[moduleName], platform);
35-
}
36-
} else {
37-
if (['@powersync/web'].includes(moduleName)) {
38-
return {
39-
type: 'empty'
40-
};
41-
}
42-
}
43-
44-
// Ensure you call the default resolver.
45-
return context.resolveRequest(context, moduleName, platform);
46-
};
47-
4821
/** @type {import('@react-native/metro-config').MetroConfig} */
4922
module.exports = mergeConfig(getDefaultConfig(__dirname), config);

0 commit comments

Comments
 (0)