Skip to content

Commit c0b72c1

Browse files
committed
fix bootstrap
1 parent ede6fc0 commit c0b72c1

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/bootstrap-amd.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,10 @@ if (nlsConfig.pseudo) {
3333
});
3434
}
3535

36-
var bootstrap = exports.bootstrap = function (entrypoint) {
37-
loader([entrypoint], function () { }, function (err) { console.error(err); });
38-
};
39-
40-
if (require.main === module) {
41-
var entrypoint = process.env['AMD_ENTRYPOINT'];
42-
if (entrypoint) {
43-
bootstrap(entrypoint);
36+
exports.bootstrap = function (entrypoint) {
37+
if (!entrypoint) {
38+
return;
4439
}
45-
}
40+
41+
loader([entrypoint], function () { }, function (err) { console.error(err); });
42+
};

src/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ process.on('uncaughtException', function (err) {
107107
}
108108
});
109109

110-
require('./bootstrap-amd');
110+
require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']);

0 commit comments

Comments
 (0)