diff --git a/lib/compile.js b/lib/compile.js index 61d8316..48e0a4d 100644 --- a/lib/compile.js +++ b/lib/compile.js @@ -423,7 +423,7 @@ function wrapSFXOutputs(loader, tree, modules, outputs, entryPoints, compileOpts // next wrap with the core code return asp(fs.readFile)(path.resolve(__dirname, (allRegister ? '../templates/sfx-core-register.min.js' : '../templates/sfx-core.min.js'))) .then(function(sfxcore) { - outputs.unshift(sfxcore.toString(), "(" + JSON.stringify(entryPoints) + ", " + JSON.stringify(externalDepIds) + ", function(" + compileOpts.systemGlobal + ") {\n"); + outputs.unshift(sfxcore.toString(), "(" + JSON.stringify(entryPoints) + ", " + JSON.stringify(externalDepIds) + ", function(" + compileOpts.systemGlobal + ", require) {\n"); outputs.push("})"); return asp(fs.readFile)(path.resolve(__dirname, '../templates/sfx-' + compileOpts.format + '.js'))