andywer / andywer/threads.js

Importing function from package in same monorepo into worker file causes Webpack to run out of memory

Aperta
#323 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
3.5k
Fork
173
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

`FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory`

This doesn't happen with every single function from every single package, but it seems to be just about every.

We're importing from these packages in a non-circular manner, only importing the function we're using, and the package we're importing from has `sideEffects: false` set.

If we duplicate the function and put it in a file in the same directory as our `worker.js` file, no problems.

I'm guessing it's related to tree-shaking? Anyone have and ideas about a solution or a route of investigation for us to pursue?

Big thanks to @andywer for sharing this amazing project!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.