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

fix: sourcemap inline dist code, caused jest oom #872

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

ycjcl868
Copy link
Contributor

@ycjcl868 ycjcl868 commented Nov 11, 2020

repo: ycjcl868/jest-terser-oom
ref: jestjs/jest#10534, webpack-contrib/terser-webpack-plugin#143
Close: #164 (comment)

If I removed the sourceMappingURL, the test case passed or caused out of memory.

image

If I removed the domprops, the test case passed too.

image

@ycjcl868 ycjcl868 mentioned this pull request Nov 12, 2020
4 tasks
@fabiosantoscode
Copy link
Collaborator

Hello there!

As you know, source maps help display better stack traces. I don't know if removing them is the right option here.

Also, is this not a Jest issue? In this issue webpack-contrib/terser-webpack-plugin#143 Terser runs out of memory during transforming code. This issue is about a code transformer not being able to take a codebase of Terser's size. It is related, but it should be on the Jest repo perhaps.

@fabiosantoscode
Copy link
Collaborator

On second thought, it's almost 1mb. Let's ditch it indeed.

If you upgrade node, you'll have nice ES6 imports so no need for source maps.

@fabiosantoscode fabiosantoscode merged commit 738350c into terser:master Nov 16, 2020
@ycjcl868 ycjcl868 deleted the fix-sourcemap-lost branch November 17, 2020 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crashes node with JavaScript heap out of memory
2 participants