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

build: enable production mode #224

Merged
merged 1 commit into from
Jan 4, 2023
Merged

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jan 3, 2023

What's the problem this PR addresses?

Corepack is built in Webpack's development mode which causes Webpack to output files with long filenames.

Fixes #130

How did you fix it?

Change it to build in production mode but disable minimizing so the code is still somewhat readable.

The bundle size also improved a bit:

$ du -s dist
- 2434    dist
+ 2170    dist

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing terser should probably be a separate PR since its not related to production mode.

I think its acceptable to merge the production change because that fixes a bug. But removing terser is more of a preference and might require further discussion.

@merceyz
Copy link
Member Author

merceyz commented Jan 3, 2023

But removing terser is more of a preference and might require further discussion.

In development mode it didn't do anything and this PR preserves that by disabling it with minimize: false, therefore the new TerserPlugin code was unnecessary so I removed it.

Copy link
Contributor

@arcanis arcanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; I probably misunderstood whether development mode would respect or not explicit optimization settings.

@arcanis arcanis merged commit 96a4e34 into nodejs:main Jan 4, 2023
@merceyz merceyz deleted the merceyz/fix/filenames branch January 4, 2023 12:27
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.

File name too long for ustar when creating a tarball of the nodejs installation
3 participants