Skip to content

Fix vite.config.ts throwing error because vite.config.js is not found #20

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thettler
Copy link

Issue

The install command searches for a vite.config.js but with a new Laravel install comes a vite.config.ts. This Throws an error and the config is not updated.

Solution

I updated the install command to check if an .js or .ts config exists and updated the existing config.

Test

I saw that there are no Tests for the Commands, or i didn't found them. I added one Test Class for the AddViteConfig Console Action but limited my self to only testing the happy path and my new Addition to keep the PR small. The Test it self is a bit hacky but should work. I would be happy if someone has a more elegant Solution.

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.

1 participant