You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a problem with module dependecy in some files which will be processed by the webpack NodeStuffPlugin.
Situation is as follows:
The dojo-webpack-loader will prepend your module body with module={id:normalizedModuleName} if you have module as AMD dependency. If you use module.id in your code this will be replaced by the NodeStuffPlugin with module.i whilst module={id:normalizedModuleName} doesn't get replaced. This leads to several undefined errors on runtime.
Solution
A solution for this is to change the prepend code to module={}; module.id = normalizedModuleName; which can be achieved by replacing line 169 in index.js with module.inject.prepend += `${dep.name}={}; ${dep.name}.id=${JSON.stringify(module.normalizedName ? module.normalizedName : '')}`;
The text was updated successfully, but these errors were encountered:
I had a problem with
module
dependecy in some files which will be processed by the webpack NodeStuffPlugin.Situation is as follows:
The dojo-webpack-loader will prepend your module body with
module={id:normalizedModuleName}
if you havemodule
as AMD dependency. If you usemodule.id
in your code this will be replaced by the NodeStuffPlugin withmodule.i
whilstmodule={id:normalizedModuleName}
doesn't get replaced. This leads to severalundefined
errors on runtime.Solution
A solution for this is to change the prepend code to
module={}; module.id = normalizedModuleName;
which can be achieved by replacing line 169 in index.js withmodule.inject.prepend += `${dep.name}={}; ${dep.name}.id=${JSON.stringify(module.normalizedName ? module.normalizedName : '')}`;
The text was updated successfully, but these errors were encountered: