vite
vite copied to clipboard
fix(css): avoid generating empty JS files when JS files becomes empty but has CSS files imported
Description
fixes #6913 fixes https://github.com/vitejs/vite/issues/6913#issuecomment-1166462434 fixes #16582
Additional context
What is the purpose of this pull request?
- [x] Bug fix
- [ ] New Feature
- [ ] Documentation update
- [ ] Other
Before submitting the PR, please make sure you do the following
- [x] Read the Contributing Guidelines, especially the Pull Request Guidelines.
- [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g.
fixes #123). - [x] Update the corresponding documentation if needed.
- [x] Ideally, include relevant tests that fail without this PR but pass with it.
Run & review this pull request in StackBlitz Codeflow.
/ecosystem-ci run
📝 Ran ecosystem CI on d8b81b4: Open
| suite | result | latest scheduled |
|---|---|---|
| analogjs | :x: failure | :white_check_mark: success |
| nuxt | :x: failure | :white_check_mark: success |
| nx | :x: failure | :x: failure |
| vite-plugin-react-pages | :white_check_mark: success | :x: failure |
| vite-plugin-vue | :x: failure | :white_check_mark: success |
:white_check_mark: astro, histoire, ladle, laravel, marko, previewjs, qwik, rakkas, sveltekit, unocss, vike, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-svelte, vite-setup-catalogue, vitepress, vitest
📝 Ran ecosystem CI on d8b81b4: Open
| suite | result | latest scheduled |
|---|---|---|
| nx | :x: failure | :x: failure |
| vite-plugin-react-pages | :white_check_mark: success | :x: failure |
:white_check_mark: analogjs, astro, histoire, ladle, laravel, marko, nuxt, previewjs, qwik, rakkas, sveltekit, unocss, vike, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-svelte, vite-plugin-vue, vite-setup-catalogue, vitepress, vitest
- Resolves https://github.com/vitejs/vite/issues/16582