Templating using RequireJS (text.js plugin) and Underscore

断了今生、忘了曾经 提交于 2019-12-06 14:34:05

This is what the RequireJS Optimizer is for. It combines all of your modules into a single file as part of your pre-deploy build process. According to the README for the text plugin:

The text files are loaded via asynchronous XMLHttpRequest (XHR) calls, so you can only fetch files from the same domain as the web page (see XHR restrictions below).

However, the RequireJS optimizer will inline any text! references with the actual text file contents into the modules, so after a build, the modules that have text! dependencies can be used from other domains.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!