andywer / andywer/threads.js

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

Ouverte
#323 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
3.5k
Forks
173
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

`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!

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.