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

vscodeIgnore some unused files to optimize extension size #1278

Merged
merged 3 commits into from
Dec 14, 2021

Conversation

jasonlyu123
Copy link
Member

#139

  • Ignore some different purpose builds for typescript. We didn't use them.
  • Ignore typescript localization. We didn't enable localized diagnostic.
  • Ignore large ESM files, We're currently using common js

Tested and it brings the size down from 105MB to 42MB. With this file size reduction, it might make sense to ship some commonly used preprocess libraries to improve UX.
About typescript localization, it's possible to enable this. So if we want to enable it in the future, I think we can keep these files.

To test packaging this, run these commands:

rm package.json yarn.lock
cd packages/svelte-vscode
yarn install
vsce package

And install the vsix file or unzip it to see the folder structure.

@dummdidumm dummdidumm merged commit d373620 into sveltejs:master Dec 14, 2021
@dummdidumm
Copy link
Member

This is great, thank you! If we want to enable localization later on we can always un-ignore those files again.
About adding possible other preprocessors: I'm a little bit hesitant to do this. Right now less and sass seem like a good addition, but with the rise of Tailwind people might expect something there, too, and over time it could become too bloated. I'd like to keep this to TypeScript-only for now. Maybe we should instead switch how we deal with these diagnostic errors and ignore errors that come from missing modules if there's no svelte.config.js? -> we should probably discuss this in an issue 😄

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.

2 participants