When i use r.js to optimize my project, how do I get it to produce a single index.html file that includes only one script (my optimized script) and one css file (my optimized css)? Is this something I would need to write myself post build?
r.js
don't include this option built-in. But with a full stack build tool, this will be achievable. I'd recommend grunt.js
for this (you'll probably want to take a look at how to create custom grunt task for this though).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.