dojo-webpack-loader
dojo-webpack-loader copied to clipboard
dojo/i18n plugin - doesn't resolve against locale before returning result?
Not sure whether I'm missing something, but it looks like references to 'dojo/i18n!some_module'
always return the root values for some_module rather than something related to the current locale.
I can see in the generated file for a root NLS file that it injects all of the specified languages (as, say, lang_fr
, lang_en
, variables etc.) but they don't appear to be used anywhere in the generated module.
(For more context, this is the code that generates those variables:
module.inject.dependencies.push({
dep: "./" + lang + "/" + path.basename(module.resourcePath, ".js"),
name: "lang_" + lang.replace(/-/g, "_")
});
Is this something that's meant to work at the moment, or is it still in progress?
Thanks!
I found that the dojo-webpack-loader wasn't correctly loading my dojo/text modules (with the raw-loader) until I used this in my webpack config:
resolveLoader: { alias: { "dojo/text": 'raw-loader' } }
This aliases dojo/text directly instead of the dojo-webpack-loader to load these files. Maybe this is related to the problem you were having?