如何使用require.js优化项目以仅生成一个JavaScript文件



我设法使用了require.js,并且优化了我的项目。但是它生成3个JavaScript文件:

1。主文件

require.js config文件(html中引用的一个为 data-main

2。require.js库

require.js。

的代码

3。我的应用程序代码

是否可以将这3个JavaScript文件合并到一个文件中?

看一下grunt js项目,特定于:

   grunt concat

和需要JS的插件:

https://github.com/asciidisco/grunt-requirejs

相关内容

最新更新