linkedin/inject — Issue #81: console.log(require('./m')) crash in require.ensure block
Author: rafalsobota
Created: 2012-02-14 11:39:18+00:00
State: open

it works:

require.ensure(['./m'], function(require) {
var m = require('./m');
console.log(m);
});

it works:

console.log(require('./m'));

it craches:

require.ensure(['./m'], function(require) {
console.log(require('./m'));
});

with stacktrace:

Uncaught SyntaxError: Unexpected end of input
extractRequiresinject.js:1031
analyzeFileinject.js:1045
onDownloadCompleteinject.js:940
processCallbacksinject.js:1002
xhr.onreadystatechangeinject.js:1144