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

Move puppeteer to devDependencies #142

Closed
wants to merge 1 commit into from

Conversation

Stanzilla
Copy link
Contributor

This is to make sure it is not included in the extension bundle. Fixes #137

This is to make sure it is not included in the extension bundle. Fixes qjebbs#137
@qjebbs
Copy link
Owner

qjebbs commented Sep 19, 2022

what's the benefit does this PR bring? Have you ever test it for chromium not download to node_modules with this change?

@Stanzilla
Copy link
Contributor Author

It fixes the mentioned issue. The extension is now around 4mb instead of 200

@qjebbs
Copy link
Owner

qjebbs commented Sep 20, 2022

I see, I forgot to delete the chromium after I tested the plugin, and published it.

I have two questions:

  • With puppeteer set to devDependencies, it's still in the node_modules, we will get the same chromium after my test in the dir puppeteer/puppeteer .
  • The extension imports codes from the puppeteer, not only for dev, but running, so chromium is still bundled on publish if I forgot to delete chromium again.

Seems that set to devDependencies doesn't change the circumstances.

qjebbs added a commit that referenced this pull request Sep 20, 2022
@Stanzilla Stanzilla closed this Sep 20, 2022
@LucasFA
Copy link

LucasFA commented Oct 20, 2023

Now puppeteer isn't shipped to the user innecessarily, but yes, adding it to devDependencies does mean that it isn't shipped to the user. You don't need to manually delete it in a shell.

Check vsce's documentation: it has a note indicating that devDependencies are automatically ignored, along with all the rest of files in .vscodeignore that are not needed at runtime

Same reasoning in general: everything that you need in order to test or build but not at runtime should go as a dev dependency

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.

This extension takes 450 MB on disk
3 participants