django-webpack / webpack-bundle-tracker

Spits out some stats about webpack compilation process to a file
MIT License
268 stars 107 forks source link

Integrity can only be used if the physical files exist #126

Open karolyi opened 3 months ago

karolyi commented 3 months ago

Hey,

I've turned on integrity and experienced errors so far with:

Tracking this bug leads to https://github.com/django-webpack/webpack-bundle-tracker/blob/4596d47632253ce557ea416d92c17265a3c286f8/lib/index.js#L31 where the readFileSync gets a path that doesn't exist and raises an exception that isn't handled.

This results in webpack silently hanging upon building the bundle with integrities.

Disclaimer: I'm not a webpack dev, just a guy who tries to use this plugin with django, emitting the integrity values in templates. If not otherwise solvable, unavailable integrity calculations should at least raise an error so guys like me would know what happened.

karolyi commented 3 months ago

I have something in the works for this. PR coming up.