Skip to content

Commit 59656c9

Browse files
committed
define call should include empty dependencies list
see: umdjs/umd#34 > Without this, the factory may be scanned for additional dependencies matching the literal string require("module-id"), which is not correct. See https://github.com/amdjs/amdjs-api/wiki/AMD#simplified-commonjs-wrapping-.
1 parent c0afdf9 commit 59656c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/UmdMainTemplatePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) {
105105
" else if(typeof define === 'function' && define.amd)\n" +
106106
(requiredExternals.length > 0 ?
107107
" define(" + externalsDepsArray(requiredExternals) + ", " + amdFactory + ");\n" :
108-
" define(" + amdFactory + ");\n"
108+
" define([], " + amdFactory + ");\n"
109109
) +
110110
(this.name ?
111111
" else if(typeof exports === 'object')\n" +

0 commit comments

Comments
 (0)