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

vike cli #1434

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

vike cli #1434

wants to merge 27 commits into from

Conversation

nitedani
Copy link
Member

No description provided.

@nitedani nitedani marked this pull request as ready for review January 19, 2024 13:36
@nitedani
Copy link
Member Author

nitedani commented Jan 20, 2024

A few cases for the new prerender behavior:
examples/react-full:

vite.config.ts -> vike() -> pnpm vike build -> no prerender
vite.config.ts -> vike({prerender: true}) -> pnpm vike build -> prerenders
vite.config.ts -> vike({prerender: false}) -> pnpm vike build -> no prerender
vite.config.ts -> vike({prerender: false}) -> pnpm vike build -c={prerender:true} -> prerenders
vite.config.ts -> vike() -> pnpm vike prerender -> prerenders with a warning
vite.config.ts -> vike({prerender: true}) -> pnpm vike prerender-> prerenders
vite.config.ts -> vike({prerender: false}) -> pnpm vike prerender-> prerenders with a warning

vite.config.ts -> vike is not included in plugins -> pnpm vike build -> no prerender
vite.config.ts -> vike is not included in plugins -> pnpm vike build -c={prerender:true} -> prerenders
vite.config.ts -> vike is not included in plugins -> pnpm vike prerender -> prerenders
vite.config.ts -> vike is not included in plugins -> pnpm vike prerender -c={prerender:false} -> prerenders with a warning

@brillout
Copy link
Member

👍 Sounds good.

@brillout
Copy link
Member

brillout commented Feb 6, 2024

Just had an idea, how about we support this:

VIKE_CONFIG="{prerender: false}" vike build

I would even go as far as to deprecate the --config option in favor of the VIKE_CONFIG env. The bottom line being that the user is supposed to only change the config over the CLI in the context of different (CI/production/staging) environements.

Likewise, the user can change Vite's config:

VITE_CONFIG="{base: '/some-base/'}" vike build

WDYT?

@nitedani
Copy link
Member Author

nitedani commented Feb 6, 2024

Ok, let's do VIKE_CONFIG and VITE_CONFIG

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