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(resolve)!: allow removing conditions #18395

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

Conversation

sapphi-red
Copy link
Member

Description

Updates the default conditions / externalConditions and remove the need for overrideConditions and other odd logics.

refs #18016
refs #18332
refs #17326
refs #9860

@sapphi-red sapphi-red added breaking change p3-significant High priority enhancement (priority) feat: environment API Vite Environment API labels Oct 18, 2024
Copy link

stackblitz bot commented Oct 18, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Comment on lines +1126 to +1129
case 'node':
return !options.webCompatible
case 'browser':
return options.webCompatible
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm using webCompatible here for now. But probably we should do it in the env side. I left this for now to do that when removing the webCompatible flag. I think it would be easier to understand the diff later if it's done at the same time with the browser field.

'module',
...options.conditions,
],
const conditions = [...options.conditions, 'require', 'import'].filter(
Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't give users a way to remove require / import as I didn't understand how that would work.

@sapphi-red
Copy link
Member Author

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

📝 Ran ecosystem CI on 15f4875: Open

suite result latest scheduled
astro failure failure
histoire failure success
quasar failure success
remix failure failure
sveltekit failure failure
vike failure failure
vite-plugin-svelte failure success
vitest failure failure

analogjs, ladle, laravel, marko, nuxt, previewjs, qwik, rakkas, redwoodjs, storybook, unocss, vite-environment-examples, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-vue, vite-setup-catalogue, vitepress, vuepress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change feat: environment API Vite Environment API p3-significant High priority enhancement (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant