git ssb

0+

cel-desktop / ssb-pkg



Tree: cfc8d49135488f7554210234b3a503c2dbd6c6a5

Files: cfc8d49135488f7554210234b3a503c2dbd6c6a5 / 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