shellscape / webpack-manifest-plugin

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

webpack-manifest-plugin is not including all entries in manifest when building using webpack 4.44 (but works fine in watch mode) #280

Closed xuesongtcy closed 2 years ago

xuesongtcy commented 2 years ago

Expected Behavior

Run npm run build, the generated manifest rev-manifest.json (dist/angular-tour-of-heroes/rev-manifest.json) include all assets. It should generate the same file like npm run build-local do.

npm run build : without watch mode npm run build-local: with watch mode

Actual Behavior

Run npm run build, the generated manifest rev-manifest.json , all assets are excluded.

Run npm run build-local, the generated manifest rev-manifest.json , include all assets.

Additional Information

We are trying to migrate from angular 8 to angular 11 and we are now encountering issues with webpack-manifest-plugin.

Here is what is generated in the manifest with ng11 when building without watch mode :

{
  "main.js": "hybrid/main.js",
  "main.js.map": "hybrid/main.js.map",
  "polyfills.js": "hybrid/polyfills.js",
  "polyfills.js.map": "hybrid/polyfills.js.map",
  "runtime.js": "hybrid/runtime.js",
  "runtime.js.map": "hybrid/runtime.js.map",
  "styles.js": "hybrid/styles.js",
  "styles.js.map": "hybrid/styles.js.map",
  "vendor.js": "hybrid/vendor.js",
  "vendor.js.map": "hybrid/vendor.js.map",
  "favicon.ico": "hybrid/favicon.ico"
}

Here is an extract of the result we should have:

{
  "main.js": "hybrid/main.js",
  "main.js.map": "hybrid/main.js.map",
  "polyfills.js": "hybrid/polyfills.js",
  "polyfills.js.map": "hybrid/polyfills.js.map",
  "runtime.js": "hybrid/runtime.js",
  "runtime.js.map": "hybrid/runtime.js.map",
  "styles.js": "hybrid/styles.js",
  "styles.js.map": "hybrid/styles.js.map",
  "vendor.js": "hybrid/vendor.js",
  "vendor.js.map": "hybrid/vendor.js.map",
  "assets/css/default.scss": "hybrid/assets/css/default.scss",
  "favicon.ico": "hybrid/favicon.ico"
}

It works as expected with the configuration 'ng10 + @angular-devkit/build-angular v0.1000.0 + webpack 4.43 + webpack-manifest-plugin 3.0', but the issue happens as soon as webpack 4.44 arrives in the next minor version of @angular-devkit.

ElodieTcy commented 2 years ago

Hello, any news regarding this issue?

shellscape commented 2 years ago

@ElodieTcy if you don't see an update on this page, there are no updates. please do not reply with useless comments like that, all they do is spam the issue and any subscribers.

@xuesongtcy thanks for the reproduction. I'll look into this as time allows. As always, a PR is welcome.

stale[bot] commented 2 years ago

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.