为什么dojo在NLS文件的错误位置查找?

时间:2014-06-10 14:23:04

标签: dojo amd nls

我正在为网站构建工作。

在构建所有内容之前,一切正常。

在我构建所有内容之后,dojo javascript和其他模块加载正常;但是,模块加载器正在错误的位置请求NLS文件。

dojo层位于/static/js/dojo/dojo.js。 有'要求'文件在/static/js/configuration.js。它们位于HTML源代码中,因此:

我的配置是:

{
   "waitSeconds":60,
   "selectorEngine":"acme",
   "packages":[
      {
         "name":"dojo",
         "location":"./dojo"
      },
      {
         "name":"dijit",
         "location":"./dijit"
      },
      {
         "name":"dojox",
         "location":"./dojox"
      },
      {
         "name":"dgrid",
         "location":"./dgrid"
      },
      {
         "name":"put-selector",
         "location":"./put-selector"
      },
      {
         "name":"xstyle",
         "location":"./xstyle"
      },
      {
         "name":"lodash",
         "location":"./lodash",
         "main":"dist/lodash"
      },
      {
         "name":"mustache",
         "location":"./mustache",
         "main":"mustache"
      },
      {
         "name":"codemirror",
         "location":"./codemirror",
         "main":"lib/codemirror"
      },
      {
         "name":"plupload",
         "location":"./plupload",
         "main":"plupload/plupload.full"
      },
      {
         "name":"vodori",
         "location":"./vodori"
      },
      {
         "name":"pepper",
         "location":"./pepper"
      },
      {
         "name":"demo-site",
         "location":"./demo-site"
      }
   ],
   "baseUrl":"/static/js",
   "author-layer":false,
   "runner":[
      "demo-site"
   ],
   "page-id":"",
   "is-built":true,
   "has":{
      "dojo-debug-messages":false
   }
}

出于某种原因,加载程序正在尝试获取/static/js/nls/dojo_en-us.js而不是查找/static/js/dojo/nls/dojo_en-us.js

我们在1.8.4上运行;我们还不能进入1.9,因为我们需要保持对< IE8 :( 尽管如此,我仍然希望这是我们的某种配置问题,而不是道场问题。

我们的个人资料文档是

/* jshint -W098 */ 
var profile = (function () { 
    'use strict'; 
    return { 
        basePath: '..', 

        action: 'release', 

        cssOptimize: 'comments', 

        mini: true, 

        optimize: 'closure', 

        layerOptimize: 'closure', 

        selectorEngine: 'acme', 

        layers: { 
            'dojo/dojo': { 
                include: [ 
                    'dojo/dojo', 
                    'dojo/domReady', 
                    'dojo/text', 
                    'dojo/i18n', 
                    'dojo/has', 
                    'dgrid', 
                    'demo-site' 
                ], 
                boot: true, 
                customBase: true 
            }, 
            'pepper/main': { 
                include: [ 
                    'pepper' 
                ], 
                exclude: [ 
                    'dojo/dojo' 
                ] 
            } 
        }, 

        packages: [ 
            { 
                name: 'pepper', 
                location: 'pepper' 
            }, 
            { 
                name: 'demo-site', 
                location: 'demo-site' 
            } 
        ], 

        staticHasFeatures: { 
            'dojo-trace-api':0, 
            'dojo-log-api':0, 

            // This causes normally private loader data to be exposed for 
            // debugging, so we don’t need that either 
            'dojo-publish-privates':0, 

            // We aren’t loading tests in production 
            'dojo-test-sniff':0, 

            'config-author-layer': 0, 
            'config-mock-data': 0, 
            'config-is-built': 1 

        }, 

        resourceTags: { 
            test: function (filename, mid) { 
                return false; 
            }, 

            amd: function (filename) 
            { 
                print(filename); 
                return (/\.js[\s]*$/).test(filename); 
            }, 

            miniExclude: function (filename, mid) { 
                return mid in { 
                    'demo-site/profile': 1 
                }; 
            } 
        } 
    }; 
})(); 

有什么建议吗?

0 个答案:

没有答案