Skip to content

fix(config): prevent vite from loading config#10360

Merged
bluwy merged 3 commits intowithastro:mainfrom
nmattia:nm-fix-vite-cfg
Mar 8, 2024
Merged

fix(config): prevent vite from loading config#10360
bluwy merged 3 commits intowithastro:mainfrom
nmattia:nm-fix-vite-cfg

Conversation

@nmattia
Copy link
Copy Markdown
Contributor

@nmattia nmattia commented Mar 7, 2024

Fixes #10262

Changes

This fixes an issue where creating a vite server (to e.g. load a TypeScript astro config) would trigger vite to look up and load an unrelated vite config (potentially going up directories).

Testing

This has not been tested because I'm not familiar with the astro testing setup...

Docs

This fixes an unexpected side effect of loading a TypeScript config. Since this is the expected behavior, it might not require documentation.

This fixes an issue where creating a vite server (to e.g. load a
TypeScript astro config) would trigger vite to look up and load an
unrelated vite config (potentially going up directories).
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 7, 2024

🦋 Changeset detected

Latest commit: 7109405

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

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

@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label Mar 7, 2024
Copy link
Copy Markdown
Contributor

@lilnasy lilnasy left a comment

Choose a reason for hiding this comment

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

Looks great to me! Thanks for taking this on.

Comment thread .changeset/khaki-emus-wait.md Outdated
Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
@nmattia
Copy link
Copy Markdown
Contributor Author

nmattia commented Mar 7, 2024

@lilnasy thanks, PTAL! as far as I'm concerned you can merge

Comment thread packages/astro/src/core/config/vite-load.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Astro does not respect vite build/serve commands

3 participants