shellscape / webpack-manifest-plugin

webpack plugin for generating asset manifests
MIT License
1.43k stars 186 forks source link

ManifestPlugin adds a release to the path for every file, which does not match the actual filepath #212

Closed aldeka-humu closed 3 years ago

aldeka-humu commented 4 years ago

I installed webpack-manifest-plugin and added it to my webpack config plugins list without any configuration--it's just new ManifestPlugin().

ManifestPlugin outputs the following manifest for this code base:

{
  "vendors.js": "/dist/564182045/041aca1e7f55a12c1fbc.js",
  "commons.js": "/dist/564182045/commons.js",
  "graphql-playground.js": "/dist/564182045/graphql-playground_33aae2b763902b6d58c4_v1.js",
  "polyfills.js": "/dist/564182045/polyfills_baed9b11603e1d4f94cc_v1.js",
  "guruFish.png": "/dist/564182045/374e79714e463d237d67f5d41973f7b7.png",
  "starfish.png": "/dist/564182045/4b0a001e2bba881ded672145079a5d72.png",
  "logo.png": "/dist/564182045/57ee3b6084cb9d3c754cc12d25a98035.png",
  "index.css": "/dist/564182045/6f0a76321d30f3c8120915e57f7bd77e.ttf",
  "one_to_one.png": "/dist/564182045/954f34be69172bc6a2d17b7ecb6fe51b.png",
  "apple-touch-icon-120x120-precomposed.png": "/dist/564182045/apple-touch-icon-120x120-precomposed.png",
  "apple-touch-icon-152x152-precomposed.png": "/dist/564182045/apple-touch-icon-152x152-precomposed.png",
  "apple-touch-icon-180x180-precomposed.png": "/dist/564182045/apple-touch-icon-180x180-precomposed.png",
  "apple-touch-icon-60x60-precomposed.png": "/dist/564182045/apple-touch-icon-60x60-precomposed.png",
  "apple-touch-icon-76x76-precomposed.png": "/dist/564182045/apple-touch-icon-76x76-precomposed.png",
  "apple-touch-icon.png": "/dist/564182045/apple-touch-icon.png",
  "1a49461e9915b37990f0e30a6f658ce1.png": "/dist/564182045/b28b0fe8de2ac534b8c7d7239c01fec8.png",
  "6ad449ceaa3ca7733ecb29dca25b8ac52ee627ce.png": "/dist/564182045/b601e082fc9ac509470454f7e6f745b8.png",
  "fishContributing.png": "/dist/564182045/ef4fcb7a4c3a703b932e82fe595b6261.png",
  "favicon.ico": "/dist/564182045/favicon.ico"
}

You'll note that the files have /dist/ and a release number folder prepended to their path, with the release number changing every time a build is run. This does not match the actual webpack output! See screenshot:

Screen Shot 2020-02-05 at 9 09 45 AM

(The actual file names and their hashes are correct, however.)

In the docs I see ways to prepend folders onto the path if so desired, but that's not supposed to be the default behavior. The documented behavior is that the output files and the manifest paths should match, and they very much don't.

FWIW I'm using webpack 4.x and webpack-manifest-plugin 2.2.0.

shellscape commented 3 years ago

Hey all! I've taken over maintenance of the plugin and am doing some housecleaning. If the issue is still pending and still a problem, please reply with a reproduction and we'll reopen post-haste.

Please provide a reproduction by choosing one of the options below:

  1. Using the REPL.it plugin reproduction template at https://repl.it/@shellscape/manifest-plugin-repro
  2. Provide a minimal repository link (Read https://git.io/fNzHA for instructions). Please use NPM for installing dependencies! These may take more time to triage than the other options.

    ⚠️ ZIP Files are unsafe and maintainers will NOT download them.