Rollup Version
4.34.7
Operating System (or Browser)
Stackblitz
Node Version (if applicable)
No response
Link To Reproduction
https://stackblitz.com/edit/rollup-repro-zsj9sxnx?file=package.json,rollup.config.js
Expected Behaviour
Either of
- The build fails with an error that tells the user to set a bigger value to
maxParallelFileOps
maxParallelFileOps to be aware of this.load called inside load hook and not to count them twice
Actual Behaviour
The build stalls and does not show any error.
Additional information
The reproduction stalls because
load hook is called many times concurrently because there's many import in a single file
- those
load hook calls this.load
- this
this.load is queued by fileOperationQueue because the load hook that called this.load has saturated the queue
If you set maxParallelFileOps: 100 in the reproduction, the build would end successfully.
This was found in vitejs/vite#19410. It was caused by this this.load call in commonjs plugin.
https://github.com/rollup/plugins/blob/94951774773a8797ff7e1a93d0a7ebf14f009327/packages/commonjs/src/index.js#L291