git ssb

0+

cel-desktop / ssb-pkg



Tree: 67c0e15a98a66eb99db2251478505d6f3d37535c

Files: 67c0e15a98a66eb99db2251478505d6f3d37535c / 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