Skip to content

Cannot resolve module 'dojo/i18n' #14

@RoyTinker

Description

@RoyTinker

Looks like including "dojo/i18n!./nls/SomeFile" as a dependency in a source file breaks when building via dojo-webpack-loader.

Error is:

ERROR in ./widgets/SourceDir/SourceFile.js
Module not found: Error: Cannot resolve module 'dojo/i18n' in [project]\src\widgets\SourceDir
 @ ./widgets/SourceDir/SourceFile.js 1:0-124:2

The source file SourceFile.js looks like:

require([
  //...
  "dojo/i18n!./nls/SomeFile"
], function (
  //...
  nls
) {
  //...
});

I'm confused, because it looks like dojo/i18n is supposed to be supported in the source (index.js):

            case 'dojo/text':
                // use webpack raw-loader instead of dojo/text
                result_loaders.push("raw");
                break;
            case 'dojo/i18n':
                // Will be loaded via DojoWebpackLoader
                break;
            default:
                debugger;
                break;

Is there something I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions