about summary refs log tree commit diff
path: root/metro.config.js
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-23 15:04:44 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-23 15:04:44 -0600
commit810fcf99105016f5f55647d326909736c3641702 (patch)
treebe4a46a0e0dccbb6c2dff47afacb0fced646e4b8 /metro.config.js
parent4eb8bc1249ccf6afaa0c77695057a13379cf1aa1 (diff)
downloadvoidsky-810fcf99105016f5f55647d326909736c3641702.tar.zst
Remove webcrypto polyfill, as it's no longer needed
Diffstat (limited to 'metro.config.js')
-rw-r--r--metro.config.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/metro.config.js b/metro.config.js
index 6b2ff5ab2..24de9fbdc 100644
--- a/metro.config.js
+++ b/metro.config.js
@@ -8,55 +8,6 @@ const metroResolver = require('metro-resolver')
 const path = require('path')
 
 module.exports = {
-  resolver: {
-    resolveRequest: (context, moduleName, platform) => {
-      // HACK
-      // metro doesn't support the "exports" directive in package.json
-      // so we have to manually fix some imports
-      // see https://github.com/facebook/metro/issues/670
-      // -prf
-      if (moduleName.startsWith('ucans')) {
-        const subpath = moduleName.split('/').slice(1)
-        if (subpath.length === 0) {
-          subpath.push('index.js')
-        } else {
-          subpath[subpath.length - 1] = `${subpath[subpath.length - 1]}.js`
-        }
-        const filePath = path.join(
-          context.projectRoot,
-          'node_modules',
-          'ucans',
-          'dist',
-          'cjs',
-          ...subpath,
-        )
-        return {
-          type: 'sourceFile',
-          filePath,
-        }
-      }
-      // HACK
-      // this module has the same problem with the "exports" module
-      // but also we need modules to use our version of webcrypto
-      // so here we're routing to a module we define
-      // -prf
-      if (moduleName === 'one-webcrypto') {
-        return {
-          type: 'sourceFile',
-          filePath: path.join(
-            context.projectRoot,
-            'src',
-            'platform',
-            'polyfills.native.ts',
-          ),
-        }
-      }
-
-      // default resolve
-      delete context.resolveRequest
-      return metroResolver.resolve(context, moduleName, platform)
-    },
-  },
   transformer: {
     getTransformOptions: async () => ({
       transform: {