git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-extensions / test-x-index.js

421 bytesRaw
1/* eslint-disable no-underscore-dangle */
2
3var Module = require('module');
4var fs = require('fs');
5
6Module._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
15require('./test-y-esnext.js');
16

Built with git-ssb-web