Dojo build nls path and data

I added a new layer to the dojo build config as shown below:

releaseDir: "./my-build",
layers: {
    "myLib": {
        include: [
            "myFile1",
            "myFile2"
      ]
  }
}

      

After build, nls are created in my-build folder and include all locale files

my-assembly /
-myLib.js
-nls
  --myLib_en-us.js

In the html file my dojoConfig:

var dojoConfig = {
    async: true,
    cacheBust: false,
    paths: {
        "ah": "/hm-webapp/resources/scripts/ah",
        "i18n": '/hm-webapp/resources/i18n'
    },
    baseUrl: "/hm-webapp/resources/scripts/dojo/",
    locale: ""
};

      

and I include my layer with a script tag:

<script src="/my-build/myLib.js">
</script>

      

But there is

404 error for myLib_en-us.js

Dojo seems to automatically download nls files, but the request path is like this

- / NLS / myLib_en-us.js

There is no "my-build" routine for nls request.

My question is how to change the nls path to the build path.

Thank.

+3


source to share





All Articles