Skip to content

Commit

Permalink
Support .mjs as file extension for es modules
Browse files Browse the repository at this point in the history
...assuming they have been transpiled properly that is, like webpack does.

Example setup: https://github.com/mobxjs/mobx/pull/1131/files

Should solve facebook#59

Beyond that I have no clue what I am doing, so this is just a proposal 😁
  • Loading branch information
mweststrate authored Sep 18, 2017
1 parent f6e2e17 commit ea3c7bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metro-bundler/src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports.assetExts = [
'ttf',
];

exports.sourceExts = ['js', 'json'];
exports.sourceExts = ['js', 'json', 'mjs'];

exports.moduleSystem = require.resolve('./Resolver/polyfills/require.js');

Expand Down

0 comments on commit ea3c7bf

Please sign in to comment.