AssetManager
AssetManager copied to clipboard
Using collections in development mode
I want to combine & minify my assets only in production mode, but in development mode I don't need todo this because it make debugging more complicated. How can I do this?
To allow minifications only in production mode I can remove filters from global.php and add to local.php in production environment and it will work great.
How can I do the same trick with collection resolvers?
Thanks!
So if I understand this correctly... You want to load all assets individually for development, and combine them in a collection for production?
If so, that's not really possible right now. You can skip the minify filter using local configs.
We could create a ViewHelper that adds the assets conditionally based on a config. I'd accept a PR for that.
Yes, I want to load all assets individually for development, and combine them in a collection for production. How this ViewHelper will work?
@dronchik The view helper would basically extend the default headScript helper. You'd be able to configure it (local config) and have it add all files in a collection individually. I'm not sure how this would work internally.
Sounds good:)