andywer / andywer/threads.js

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

オープン
#323 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
3.5k
フォーク
173
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。