Skip to content

Commit

Permalink
Support transforming .mjs files by default
Browse files Browse the repository at this point in the history
Part of #51
  • Loading branch information
leebyron committed Feb 15, 2018
1 parent 33c6579 commit be56e02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion register.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function setOptions(newOptions) {
// this require hook must come after it. Encourage those module authors to call
// the prior loader in their require hooks.
var jsLoader = require.extensions['.js'];
var exts = [ '.js', '.jsx', '.flow', '.es6' ];
var exts = [ '.js', '.mjs', '.jsx', '.flow', '.es6' ];
exts.forEach(function (ext) {
var superLoader = require.extensions[ext] || jsLoader;
require.extensions[ext] = function (module, filename) {
Expand Down

0 comments on commit be56e02

Please sign in to comment.