Open KonnorRogers opened 1 year ago
Im still undecided on this. It adds a lot of complexity, it goes against the mantra of "let your bundler handle your assets", and it introduces 2 ways to handle things.
However, its also reasonable that people may not be using a bundler at all and all they want from AssetMapper is asset fingerprinting.
EDIT: I think I just convinced myself this is needed. It wont do asset compression, minification, etc. Just a simple file hasher.
Not sure why Sprockets went away from it, but Guard seems like an easy way to handle this.
not all files should need to be imported by your bundler. Right now to get the most performant bundle you need two entrypoints.
This can get confusing as to "when should I import assets in the app bundle or the asset bundle"
It's also particularly annoying if your bundler doesn't accept glob imports.
As a result, AssetMapper should accept a Rake FileList of files to watch.
importantly the file list should probably exclude CSS and JS assets.