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

Disable config file loading in experimental vite-node compiler #1238

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

askoufis
Copy link
Contributor

@askoufis askoufis commented Nov 19, 2023

I'm attempting to get a vite-plugin-next going using the experimental vite-node compiler, but ran into a bug when testing it in an external vite project (not the fixture).

Despite the compiler creating a vite server programmatically using inline config, vite will still resolve and merge in a vite.config.ts file if it finds one. This causes the vite-node vite server to end up with a copy of the VE vite plugin, which then tries to spin up another compiler, which tries then finds and merges the vite config, looping infinitely.

Setting configFile: false disables this config resolution behaviour. I can't think of a reason why we'd want to implicitly merge the user's vite config into the vite-node compiler's config, so this seems like a sensible change to me. The vite fixture config already sets this, so I didn't pick up the bug until I tried the plugin in a separate project.

Copy link

changeset-bot bot commented Nov 19, 2023

🦋 Changeset detected

Latest commit: 60ee030

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/integration Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@askoufis askoufis enabled auto-merge (squash) November 20, 2023 03:14
@askoufis askoufis merged commit fd5d9fc into master Nov 20, 2023
11 checks passed
@askoufis askoufis deleted the vite-node-disable-config-file branch November 20, 2023 03:17
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