Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

doesn't work with webpack-manifest-plugin #32

Open
senid231 opened this issue Jan 2, 2018 · 4 comments
Open

doesn't work with webpack-manifest-plugin #32

senid231 opened this issue Jan 2, 2018 · 4 comments

Comments

@senid231
Copy link

senid231 commented Jan 2, 2018

webpack-manifest-plugin is plugin for creating assets manifest.
It creates JSON file with a mapping of all source file names to their corresponding output file.
But manifest created with webpack-pwa-manifest not appear in assets manifest

i think it's related to shellscape/webpack-manifest-plugin#102 (comment)

but maybe it can be solved from side of webpack-pwa-manifest ?

@arthurbergmz
Copy link
Owner

I can try to figure it out, but since both of them use the 'emit' event, there is no way yet to webpack-manifest-plugin retrieve files generated by this plugin, I guess.

I'll keep this issue under discussion.

@mikemix
Copy link

mikemix commented Aug 28, 2019

I'm using Webpack 4.3. The generated manifest file indeed appears in the asset manifest file, but the key is invalid, should be:

"build/manifest.json": "/build/manifest.a9031d64929e9c54d88c7a0b4cc11f47.json",

but is instead

"build/manifest.a9031d64929e9c54d88c7a0b4cc11f47.json": "/build/manifest.a9031d64929e9c54d88c7a0b4cc11f47.json",

meaning it's not valid and I cannot use it. Don't know which plugin is responsible for this though :(

@maps82
Copy link

maps82 commented Jan 12, 2021

To fix the problem described by @mikemix I use the map option of the webpack-manifest-plugin to change the key of the web manifest file:

...
.configureManifestPlugin((options) => {
    options.map = (file) => {
      if (/^build\/webmanifest\..+\.json$/.test(file.name)) {
        file.name = 'build/webmanifest.json';
      }
      return file;
    };
})
...

(Note this is webpack encore, not a pure webpack config...)

@molfar
Copy link

molfar commented May 20, 2021

Have the same issue with webpack 4.46.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants