Dojo构建请求已内联的Dijit模板 [英] Dojo build requesting already inlined Dijit templates
问题描述
我是一个大型Dojo项目的开发人员,并且Google Closure编译器遇到一些问题。
I am a developer on a large Dojo project and I am having some issues with the Google Closure compiler.
我们有大约一百个Dijit小部件模板,因此计划是使Closure编译器内联JavaScript文件中的HTML,而不是要求它们采用AMD样式。
We have around a hundred templates for Dijit widgets so the plan was to make the Closure compiler inline the HTML in the JavaScript file rather than require them AMD style.
为实现这一点,我更改了/ profiles /中的 mini参数app.profile.js从true到false。
To achieve this I changed the "mini" parameter in /profiles/app.profile.js from true to false.
编译时,一切似乎都可以正常运行,即使在运行该应用程序时我也没有问题,但是发生了一些奇怪的事情。
When compiling, everything seems to work fine, even when running the app i have no issues but something strange happens.
即使在dojo.js文件中正确内联了HTML模板,dojo仍向服务器向相应的模板文件发出HTTP请求!
Even if the HTML templates are correctly inlined in the dojo.js file, dojo is still making HTTP requests to the corresponding template file to the server !
通过检查Closure Compiler产生的美化版本,我可以观察到每个HTML模板都位于两个不同的位置:
By inspecting a "beautified" version of what the Closure Compiler produced I can observe that each HTML template is present in two different places :
1)以以下格式插入JavaScript中:
1) Inlined in the JavaScript in the following format :
"url:path/to/my/template.html":"<p>Some more HTML</p>"
2)作为AMD中必需的伪模块,要求:
2) As a required pseudo-module in the AMD require :
dojo/text!./path/to/my/template.html
我在BuildSystem类别的网站上搜索了错误报告: BuildSystem ,但最终找不到任何相关帮助。
I searched the bug reports on their website in the BuildSystem category : BuildSystem but ultimately couldn't find any relevant help.
-
这是我吗?使用Google Closure编译器还是这是一个打开/未报告的错误?
Is this me just wrongly using the Google Closure Compiler or is this a open / unreported bug ?
如何解决此问题?
多谢!
推荐答案
如果指的是仅在1.9.0版本中存在的问题,那么它就是 https://bugs.dojotoolkit.org/票证/ 17141 。
If you are referring to an issue that only exists in 1.9.0, then it is https://bugs.dojotoolkit.org/ticket/17141.
这篇关于Dojo构建请求已内联的Dijit模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!