QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.85k stars 1.31k forks source link

feat(qwik): feature flags #6880

Closed wmertens closed 2 months ago

wmertens commented 2 months ago

Allow putting features behind feature flags

Starting with the valibot flag.

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 9e711520af9e33a346e05cc8f529fdb20bc1834e

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

This PR includes changesets to release 4 packages | Name | Type | | --------------------- | ----- | | @builder.io/qwik | Minor | | @builder.io/qwik-city | Minor | | eslint-plugin-qwik | Minor | | create-qwik | Minor |

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

pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

npm i https://pkg.pr.new/@builder.io/qwik@6880
npm i https://pkg.pr.new/@builder.io/qwik-city@6880
npm i https://pkg.pr.new/eslint-plugin-qwik@6880
npm i https://pkg.pr.new/create-qwik@6880

commit: 9e71152

github-actions[bot] commented 2 months ago
built with Refined Cloudflare Pages Action

âš¡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 9e711520af9e33a346e05cc8f529fdb20bc1834e
thejackshelton commented 2 months ago

I like what Astro does in this case.

    experimental: {
        i18nDomains: true
    },

An experimental object in the vite config that is typed

wmertens commented 2 months ago

@thejackshelton I can do that too, but I prefer the shorter ['valibot', 'preventNavigate'] which doesn't need true added. It's also typed BTW.

thejackshelton commented 2 months ago

@thejackshelton I can do that too, but I prefer the shorter ['valibot', 'preventNavigate'] which doesn't need true added. It's also typed BTW.

In that case something like:

experimental: ['valibot', 'preventNavigate']

works for me too as long as it's typed and autocompletes with the experimental thing to try out.

shairez commented 2 months ago

Great job @wmertens

I also think experimentalFeatures is better than unstableFeatures (if we're changing it, I suggest to change it across the entire PR)

PatrickJS commented 2 months ago

awesome