Skip to content

[set-webpack-public-path] The "hash" token does not match actual script hash #1107

Open
@sirianni

Description

@sirianni

I am using SetPublicPathPlugin with the following configuration:

  plugins: [
    new SetPublicPathPlugin({
      scriptName: {
        name: '[name]\-[hash]\.js',
        isTokenized: true,
      },
    }),
  ],

The hash being inserted into the generated webpack module cc6e266258d04761cb6d:

/******/ 	// Set the webpack public path
/******/ 	(function () {
/******/ 	  var scripts = document.getElementsByTagName('script');
/******/ 	  var regex = new RegExp('login-cc6e266258d04761cb6d.js', 'i');
/******/ 	  var publicPath;

does not match the hash on the actual javacript bundle 4288b4fe1b87f8361a02:

Entrypoint login [big] = login-4288b4fe1b87f8361a02.js

Metadata

Metadata

Assignees

Labels

needs more infoWe can't proceed because we need a better repro or an answer to a question

Type

No type

Projects

Status

Needs triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions