Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure ForkTsCheckerWebpackPlugin memory limit to avoid crashing #8676

Closed
nickretallack opened this issue Mar 20, 2020 · 8 comments
Closed

Comments

@nickretallack
Copy link

nickretallack commented Mar 20, 2020

If your typescript code base is large enough, ForkTsCheckerWebpackPlugin can hit its memory limit and crash. To increase the memory limit, you have to edit the webpack config. I filed an issue on their repo about this, but they're passing the buck on to you. Can we make this configurable without ejecting?

@onedevlad
Copy link

Does this have anything to do with #8096?

@Chnapy
Copy link

Chnapy commented Apr 2, 2020

Does this have anything to do with #8096?

I'm not sure. I have this issue, and with some dirty manips I succeeded to increase this memory limit without any change with this issue (my build took sometimes more than 12Go before crashing...).

But anyway, the capability of define the memoryLimit without doing a fork or touching the code in the node_modules is obviously appreciated.

@nickretallack
Copy link
Author

@vlatri: They don't specify whether they're using typescript or not in that issue, which matters.

If you're not using typescript, everything is done in one process and you can just pass arguments to react-scripts that get passed along to node so you can easily increase the memory limit on a command in package.json like this:

"start": "react-scripts --max-old-space-size=3072 start",

But if you're using typescript, you also have to worry about ForkTsCheckerWebpackPlugin, and it seems like you currently can't configure that without ejecting or otherwise patching react-scripts.

@piotr-oles
Copy link

I wouldn't like to mess with the tsconfig.json file - my proposition is to use cosmiconfig to be able to configure the plugin with external file or package.json entry. I'm preparing a major rewrite of the plugin and I will add this feature as a part of the 5.0.0 release 🚀

@stale
Copy link

stale bot commented May 6, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label May 6, 2020
@stale
Copy link

stale bot commented May 13, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed May 13, 2020
@nickretallack
Copy link
Author

@piotr-oles Ok cool so does that mean this issue should stay open or not?

@piotr-oles
Copy link

@nickretallack There is an open PR: TypeStrong/fork-ts-checker-webpack-plugin#404 - this feature is on the list to implement. Currently, I'm working on tests, then I will release an alpha version of 5.0.0. It will be implemented before releasing stable 5.0.0.

@lock lock bot locked and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants