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

Vite: Do not add Webpack loaders when using Vite builder #19263

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 26, 2022

Issue: N/A

What I did

I noticed that the sb init command was adding a vue-loader and svelte-loader even when I'm using a vite-based framework. To prevent this, while keeping the original behavior for webpack projects, I updated the generators to only add the extra packages when webpack is being used.

How to test

Build the branch (necessary?), then run yarn generate-repros-next --local-registry. Check the /repros/svelte-vite/default-js directory and verify that svelte-loader is not in package.json. Similarly for the vue3 repro.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM. We can probably take this further, but this is a great first step

@shilman shilman merged commit 08d9bcd into next Sep 27, 2022
@shilman shilman deleted the vite/no-generator-loaders branch September 27, 2022 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants