By default, Yii 2.0 chooses to use the non-minified version of Jquery and Bootstrap files (CSS and JS). However, there's a simple way to indicate Yii to use the minified version.
By default, Yii 2.0 chooses to use the non-minified version of Jquery and Bootstrap files (CSS and JS). However, there's a simple way to indicate Yii to use the minified version.
If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update
tasks.
During development and depending on your setup you may need to use the options forceCopy
or
linkAssets
of the asset manager to work around possible file-system and permission issues.
Alternatively, inline assets (JS/CSS) can be registered at runtime from within the View
.
For example you can clearly simulate the ajaxLink feature using a inline javascript. Its however recommended if you can merge where possible, client code (JS/CSS) into separate JS/CSS files and loaded through the AssetBundle. Note there is no more need of a CClientScript anymore:
A Yii Framework 2 component for using assets in different environments (Local/CDNs)