Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-50-extensions / test-x-index.js
421 bytesRaw
1 | /* eslint-disable no-underscore-dangle */ |
2 | |
3 | var Module = require('module'); |
4 | var fs = require('fs'); |
5 | |
6 | Module._extensions['.js'] = function (module, filename) { |
7 | var content = fs.readFileSync(filename, 'utf8'); |
8 | // emulating babel-register |
9 | content = content.replace( |
10 | 'import x from \'./test-z-sub.js\';', |
11 | 'require(\'./test-z-sub.js\');'); |
12 | module._compile(content, filename); |
13 | }; |
14 | |
15 | require('./test-y-esnext.js'); |
16 |
Built with git-ssb-web