现在打算将第三方的 css/js 依赖合并、压缩、输出到output目录下。
遇到一个问题,有些 js/css 会相对引用一些资源。比如 bootstrap.min.css 会依赖 fonts/,如下所示:
bootstrap/
dist/
css/
bootstrap.min.css
fonts/
glyphicons-halflings-regular.woff
那么在合并压缩后,如何处理这些相对引用的资源?
除了将 fonts/glyphicons-halflings-regular.woff 手动拷贝一下:
output/
app.css
fonts/
glyphicons-halflings-regular.woff
之外,还有更好的方法吗?