Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用 r.js 优化我的项目时,如何让它生成一个 index.html 文件,其中只包含一个脚本(我的优化脚本)和一个 css 文件(我优化的 css)?这是我需要在构建后自己编写的东西吗?
r.js不要内置此选项。但是使用完整的堆栈构建工具,这是可以实现的。我建议grunt.js这样做(尽管您可能想看看如何为此创建自定义 grunt 任务)。
r.js
grunt.js