surma / rollup-plugin-off-main-thread

Use Rollup with workers and ES6 modules today.
Apache License 2.0
307 stars 32 forks source link

Pinned rollup versions has unintended consequences #23

Closed bennypowers closed 3 years ago

bennypowers commented 4 years ago

Anti-mass spectrometer

I hope you are doing well during the general quarantine and that you're safe at home

This issue is relevant to a problem I've been having where npx rollup -cw builds with two separate versions of rollup

After extensive troubleshooting of the above issue, Today I discovered this:

$ rg "1\.31\.1" node_modules/@surma
node_modules/@surma/rollup-plugin-off-main-thread/package.json
55:    "rollup": "1.31.1"
$ npx npm-why @surma/rollup-plugin-off-main-thread
npx: installed 4 in 1.141s
  Who required @surma/rollup-plugin-off-main-thread:
  my-pwa > rollup-plugin-workbox > workbox-build > @surma/rollup-plugin-off-main-thread@1.2.0

This indicates to me that the root cause of the problem is that @surma/rollup-plugin-off-main-thread pins rollup to 1.31.1, there by causing two versions to be installed, and somehow that causes rollup -cw to run twice in parallel πŸ€·β€β™‚

I would appreciate your πŸ‘€ on this and thank you for publishing this package.

P.S. although workbox-build is behind in updating its dependence on this package, the latest (1.4.1) of this package still pins rollup

surma commented 3 years ago

This should be fixed!

bennypowers commented 3 years ago

Thank you πŸ˜ƒ