Skip to content

Commit

Permalink
chore(runtime): add missing mjs extension to source resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Sep 15, 2023
1 parent 02ee93b commit dd3ce04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ if (boolish('SNACK_EXPORT_WEB', false)) {
const semver = require('semver');

config.transformer.publicPath = `/v2/${semver.major(expoVersion)}/assets`;

// Error: While trying to resolve module `@socket.io/component-emitter` from file `/runtime/node_modules/socket.io-parser/build/esm/index.js`,
// the package `/runtime/node_modules/@socket.io/component-emitter/package.json` was successfully found.
// However, this package itself specifies a `main` module field that could not be resolved
config.resolver.sourceExts.push('mjs');
}

module.exports = config;

0 comments on commit dd3ce04

Please sign in to comment.