unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more
https://unplugin.unjs.io
MIT License
2.9k stars 104 forks source link

Custom webpack in angular doesn't end the process #323

Open MitkoTschimev opened 11 months ago

MitkoTschimev commented 11 months ago

Environment

node v18.16.0 yarn 1.22.19

Reproduction

angular project with custom webpack build and a simple unplugin webpack

Describe the bug

When I use a simple plugin like from the README the webpack build is finishing but not the process.

There is an open bug already in this repo reflecting the issue and we nailed it down to unplugin https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/345

Additional context

Using angular build with custom webpack

Logs

...
.4f2ff3e0af47abf5.js       | -                                                          |    1.43 kB |               379 bytes
132.d8c941aef3c40f87.js       | -                                                          |    1.36 kB |               357 bytes
46.aa7058329ea7dbb9.js        | -                                                          |    1.30 kB |               379 bytes
4551.42dff3dcc57bae1d.js      | -                                                          |    1.23 kB |               365 bytes
516.63e0fb170e8ff7a4.js       | -                                                          |    1.12 kB |               343 bytes
6312.75a7af435b28b3ec.js      | -                                                          | 1023 bytes |               298 bytes
905.50217fec4c79a6c7.js       | -                                                          |  660 bytes |               259 bytes
7610.4e578af278c2d206.js      | -                                                          |  634 bytes |               272 bytes
7466.962bcc04afa6c86a.js      | -                                                          |  545 bytes |               280 bytes
1505.21beccbec3068a1b.js      | -                                                          |  493 bytes |               254 bytes
1615.6b319c40bff0a19e.js      | -                                                          |  432 bytes |               244 bytes

Build at: 2023-07-17T23:22:08.730Z - Hash: 323c6116f7851f00 - Time: 85234ms
Agrumas commented 3 months ago

I can confirm, it happens with Angular 14

SeanCassiere commented 1 day ago

Not sure if this helps, but we (TanStack Router) had a similar issue, where the webpack version of the plugin didn't ever end, during build.

With a bit of Googling, this was the fix we implemented: https://github.com/TanStack/router/blob/9616d0193bb3bdf9af60ee3475c30dfd30927416/packages/router-plugin/src/code-splitter.ts#L221