acidburn23
acidburn23

Reputation: 200

How to include the dijit.css and other related .css files in the dojo build file

I'm trying to create a dojo build file. What do I need to add in the profile.js file to include all the .css files inside the dojo build.js file. I'm getting dijit.js and other .js files, but the dependent .css files are not getting built into the build.js file

I'm using dojo 1.8

Upvotes: 0

Views: 531

Answers (1)

Ken Franqueiro
Ken Franqueiro

Reputation: 10559

It doesn't really make sense to ask to combine JS and CSS into a single file. JavaScript is JavaScript; CSS is CSS.

That said, you should be able to get down to as little as one CSS request by specifying cssOptimize: 'comments' in your build profile, which will strip comments from CSS files within packages the build processes, and flatten imports. As a result, each Dijit theme's main CSS file (e.g. themes/claro/claro.css) will then require only one request, rather than requests for each component.

Upvotes: 2

Related Questions