Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
karolyi opened this issue Jul 28, 2024 · 1 comment
Open

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

karolyi opened this issue Jul 28, 2024 · 1 comment

Comments

@karolyi
Copy link

karolyi commented Jul 28, 2024

Hey,

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

  • using webpack-dev-server that only stores the files in-memory since they will get rebuilt upon change
  • sourcemap files that aren't built or not in the place the bundle tracker thinks they are

Tracking this bug leads to

return fs.readFileSync(path, { encoding: 'utf-8' });
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 karolyi changed the title Integrity can only be used if the physical file exist Integrity can only be used if the physical files exist Jul 28, 2024
@karolyi
Copy link
Author

karolyi commented Jul 28, 2024

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

karolyi added a commit to karolyi/webpack-bundle-tracker that referenced this issue Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant