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: prevent pnpm from removing dev deps while in production #19

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

ntnyq
Copy link
Contributor

@ntnyq ntnyq commented Nov 21, 2024

Description

This PR adds an args --prod=false to installPackage function for pnpm.

Prevent it from removing installed devDeps while NODE_ENV is production

Linked Issues

Fix #18

Additional context

Refs:

Besides

@iconify/utils and @unocss/preset-icons need to be updated after this is addressed.

I'm encountering this from using unocss.

@antfu
Copy link
Member

antfu commented Nov 22, 2024

I don't know. Isn't this too specific to your case? Why NODE_ENV is production in your case?

@ntnyq
Copy link
Contributor Author

ntnyq commented Nov 22, 2024

I don't know. Isn't this too specific to your case? Why NODE_ENV is production in your case?

I removed @iconify/json from deps and added autoInstall: true to presetIcons.

Then run build script, let unocss do the rest.

@ntnyq
Copy link
Contributor Author

ntnyq commented Nov 22, 2024

I'm wondering is there any case people need to remove already installed devDeps while installing deps.

If so, maybe we could add an option and fix this case in iconify repo.

@antfu antfu merged commit 315f1f0 into antfu-collective:main Nov 27, 2024
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.

pnpm will remove all other devDeps while in production mode
2 participants