Skip to content

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

Open
@karolyi

Description

@karolyi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions