webpack-manifest-plugin: Manifest Plugin is not including all folders on --watch

Webpack Version Webpack 4.6.0

webpack-manifest-plugin Version

webpack-manifest-plugin@^2.0.0-rc.2:
  version "2.0.0"

copy-webpack-plugin version

copy-webpack-plugin@^4.5.1:
  version "4.5.1"

Link to webpack config https://gist.github.com/jasonwilliams/60680ffa363ab9c86166f3cc4c86dc9f

Desc When using these 2 plugins together on build they seem to work well, i get a full manifest. But when using in --watch mode, the vendor files don’t seem to be added 😦

Here is the results from the full build

{
  "listen.js": "js/listen.f22c5b9fb716ec45b423.js",
  "listen.css": "css/listen.31a7b45ed23184da32a4.css",
  "listen.js.map": "js/listen.f22c5b9fb716ec45b423.js.map",
  "listen.css.map": "css/listen.31a7b45ed23184da32a4.css.map",
  "play.js": "js/play.850a763a8bd980b76d07.js",
  "play.css": "css/play.31a7b45ed23184da32a4.css",
  "play.js.map": "js/play.850a763a8bd980b76d07.js.map",
  "play.css.map": "css/play.31a7b45ed23184da32a4.css.map",
  "js/vendor/react-redux.js": "js/vendor/react-redux.1b10249be8.js",
  "js/vendor/redux.js": "js/vendor/redux.bd26d59a87.js",
  "js/vendor/react.js": "js/vendor/react.20dbe1f623.js",
  "js/vendor/react-modal.js": "js/vendor/react-modal.100c892e9b.js",
  "js/vendor/axios.js": "js/vendor/axios.66d856181b.js",
  "js/vendor/react-dom.js": "js/vendor/react-dom.ef9d735068.js",
  "js/cap-web-components.js": "js/cap-web-components.9b28ae7111.js",
  "img/favicon.ico": "img/favicon.ico",
  "img/track.png": "img/track.png",
  "img/beta_logo.svg": "img/beta_logo.svg"
}

however on --watch i only get this output in the manifest output

{
  "listen.js": "js/listen.f22c5b9fb716ec45b423.js",
  "listen.css": "css/listen.b5f1f039f27b532dc2d1.css",
  "listen.js.map": "js/listen.f22c5b9fb716ec45b423.js.map",
  "listen.css.map": "css/listen.b5f1f039f27b532dc2d1.css.map",
  "play.js": "js/play.850a763a8bd980b76d07.js",
  "play.css": "css/play.b5f1f039f27b532dc2d1.css",
  "play.js.map": "js/play.850a763a8bd980b76d07.js.map",
  "play.css.map": "css/play.b5f1f039f27b532dc2d1.css.map"
}

I’m not sure whether the problem lies in the copy plugin or within this manifest plugin. When i check the files in vendor they are there and hashed, so it looks like the manifest doesn’t pick these up on watch. Do you have any idea why this happens?

_Comment from https://github.com/webpack-contrib/copy-webpack-plugin/issues/104_

@jasonwilliams Should be fix it danethurber/webpack-manifest-plugin#141 first and when i implement support webpack-manifest-plugin by default

Is this issue related to https://github.com/danethurber/webpack-manifest-plugin/issues/141 ?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 21 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@mastilver sorry maybe my comment wasn’t clear - I am getting the same issue:

  • Initial build works fine and files appear correctly
  • Subsequent builds afterwards are missing files that were copied with copy-webpack-plugin

It’s the same issue as above.

Oh actually, as a workaround, if you set the seed options to {}, it should work

@mastilver seems like you’re correct!

Thanks for the help and apologies for taking your time with this - good work on the plugin 👍

Yeah, I believe it’s an issue with your code, try removing

		seed['js'] = {};
		seed['css'] = {};

Oh actually, as a workaround, if you set the seed to {}, it should work

@mastilver it works! When will it be included in the new version?

My yarn.lock

webpack-manifest-plugin@danethurber/webpack-manifest-plugin#80c01c5dd2aac751ea49bfa1b9ddac26fc35bf44:
  version "2.0.0-rc.2"
  resolved "https://codeload.github.com/danethurber/webpack-manifest-plugin/tar.gz/80c01c5dd2aac751ea49bfa1b9ddac26fc35bf44"
  dependencies:
    fs-extra "^0.30.0"
    lodash ">=3.5 <5"
    tapable "^1.0.0"