Closed aaronte closed 8 years ago
Hello,
you will have to use a webpack plugin for that, either something that replaces the file names in your js code: https://github.com/zhongzhi107/replace-hash-webpack-plugin or something that emits the list of new hash names like that one: https://github.com/kossnocorp/assets-webpack-plugin
@ocombe Thanks! https://github.com/zhongzhi107/replace-hash-webpack-plugin didn't work with weird errors. But https://github.com/kossnocorp/assets-webpack-plugin worked by referencing the json
file that it emits. Was hoping that there would be a solution that dynamically changes the path in my js
without the mapping but this works!
I am trying to lazy load a separate bundle that webpack generates like so:
My problem is when I deploy to production, I add a
[hash]
to my bundle names for cache busting. How am I able to rename myocLazyLoaded
file dynamically depending on how webpack generates the hash?