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

feat: add compatibility with Vite 6 Environment API #2146

Merged
merged 41 commits into from
Feb 9, 2025

Conversation

magne4000
Copy link
Member

@magne4000 magne4000 commented Feb 6, 2025

This is a WIP to add Environment API compatibility, by calling buildApp instead of vite.build (keeping current behaviour as default).

  • new useEnvironmentAPI viteEnvironmentAPI config. Naming, location and whether it should be on the Vike CLI only -> to be discussed
  • autoFullBuild is disabled in this mode
  • New vike:buildApp plugins to mimic autoFullBuild

@brillout
Copy link
Member

brillout commented Feb 6, 2025

Thank you for opening this early; so far there aren't any conflicts with my last refactoring. I'll be merging main into this PR whenever I push refactorings to main.

@brillout
Copy link
Member

brillout commented Feb 6, 2025

Btw. I should be done with my refactoring soon. The bulk of it is done, it's now "only" about small things.

@brillout
Copy link
Member

brillout commented Feb 6, 2025

  • Naming

I'd suggest viteEnvironmentAPI.

vike.dev/TODO

I guess we don't need docs for it for now. It's mostly/only going to be used by our own extensions anyways.

@magne4000 magne4000 changed the title Compatibility with Vite 6 Environment API feat: add compatibility with Vite 6 Environment API Feb 6, 2025
@brillout
Copy link
Member

brillout commented Feb 6, 2025

Your IDE seems to re-order imports. Can we revert these changes? We can eventually agree on some new linting rules after I merged all pending PRs & branches.

@magne4000
Copy link
Member Author

Your IDE seems to re-order imports. Can we revert these changes? We can eventually agree on some new linting rules after I merged all pending PRs & branches.

Indeed, and I still don't know why, as the option is disabled :/

@magne4000
Copy link
Member Author

magne4000 commented Feb 6, 2025

Your IDE seems to re-order imports. Can we revert these changes? We can eventually agree on some new linting rules after I merged all pending PRs & branches.

Indeed, and I still don't know why, as the option is disabled :/

It seems like the IntelliJ Biome plugin does biome check --apply even if Run Biome check with --apply is unchecked... I'm disabling it and reverting the changes

EDIT: Issue created

@magne4000 magne4000 force-pushed the magne4000/environment-api branch from 884f71f to ff0b99d Compare February 6, 2025 17:19
@magne4000 magne4000 marked this pull request as ready for review February 7, 2025 15:55
@magne4000 magne4000 requested a review from brillout February 7, 2025 15:55
@magne4000
Copy link
Member Author

magne4000 commented Feb 7, 2025

You can do your refactoring @brillout. I do not know how I can manage to create a unit test with vite@5 in the same monorepo. Calling vike build always use the Vite version in the linked vike package (See this issue). We could call vite build instead, but that doesn't seem really wise.

@brillout
Copy link
Member

brillout commented Feb 7, 2025 via email

@brillout brillout force-pushed the magne4000/environment-api branch from 7b457a8 to 56f46a1 Compare February 9, 2025 12:44
@brillout brillout force-pushed the magne4000/environment-api branch from 56f46a1 to f197ca6 Compare February 9, 2025 13:26
@brillout brillout force-pushed the magne4000/environment-api branch from f197ca6 to 0956607 Compare February 9, 2025 13:32
@brillout brillout merged commit d9703b8 into main Feb 9, 2025
18 checks passed
@brillout brillout deleted the magne4000/environment-api branch February 9, 2025 14:38
@brillout
Copy link
Member

brillout commented Feb 9, 2025

d296d91; let me know if that's 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