How to minify css files with RequireJS

后端 未结 4 1231
一生所求
一生所求 2021-01-13 09:29

I have a backbone project with several js files and a couple of css files

I\'d like to have them minified to a single js and a single css

So far, I managed t

4条回答
  •  隐瞒了意图╮
    2021-01-13 09:47

    r.js doesn't work this way: (from the docs)

    RequireJS has an optimization tool that does the following

    (...)

    Optimizes CSS by inlining CSS files referenced by @import and removing comments.

    You'll have to create one "master" stylesheet which references individial CSS files via @import, there's no option for concatenation of *.css in a specified folder.

提交回复
热议问题