4 ms·
webpack allows some pretty sophisticated resource pipelines that go beyond what you can do with browserify, especially around binary resources. One of my use c
by drhayes9 10y ago
webpack allows some pretty sophisticated resource pipelines that go beyond what you can do with browserify, especially around binary resources.
One of my use cases is working on a HTML5 game. I pre-process all the tilemap levels to add unique IDs to the entities within the file, but only for those JSON files that look like tilemaps. Each of those files' names get mangled as a hash of their contents as well, so I get some cache-busting for free.
Similarly, I can pngcrush the image assets that pass a certain rule, etc.
- tboyd47 10y agoAwesome. Guessing you wrote your own Webpack loader for tilemaps? I'd love to hear more about what went into that. I had the same reaction as GP when I first saw it (meh, just another overly complex tool, who cares) but you can really do some ridiculously cool stuff with it. I also love how stable it is, compared to the ecosystem it's associated with.
- drhayes9 10y agoSure! Here's a short write-up I've been meaning to do that you spurred me into: https://drhayes.io/secret-game/map-entity-loader.html https://drhayes.io/secret-game/map-entity-loader.html The save system is next on my list of write-ups.