-
Notifications
You must be signed in to change notification settings - Fork 7
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
build: vite v6 #541
base: main
Are you sure you want to change the base?
build: vite v6 #541
Conversation
> If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.
# Motivation Fix an error - that blocks the build - detected when migrating to Svelte v5 in #541: > error during build: [vite-plugin-svelte] [plugin vite-plugin-svelte] src/routes/(page)/browser/+page.svelte (27:2): src/routes/(page)/browser/+page.svelte:27:2 `<tr>` cannot be a child of `<table>`. `<table>` only allows these children: `<caption>`, `<colgroup>`, `<tbody>`, `<thead>`, `<tfoot>`, `<style>`, `<script>`, `<template>`. The browser will 'repair' the HTML (by moving, removing, or inserting elements) which breaks Svelte's assumptions about the structure of your components # Changes - Add `tbody`
# Motivation Fix a linter error reported by latest Svelte v5 linter in #541: > Self-closing HTML tags for non-void elements are ambiguous — use `<div ...></div>` rather than `<div ... />`(element_invalid_self_closing_tag) svelte/valid-compile # Changes - Replace self closing tags. e.g. `<div />` -> `<div></div>`
# Motivation Fix an error - that blocks the build - detected when migrating to Svelte v5 in #541: > error during build: [vite-plugin-svelte] [plugin vite-plugin-svelte] src/lib/components/MenuItem.svelte (73:10): src/lib/components/MenuItem.svelte:73:10 Nesting selectors can only be used inside a rule or as the first selector inside a lone `:global(...)` It seems that the rule is actually unused / not applied. Therefore I remove it. # Changes - Remove nested CSS global rule.
We have an issue upgrading vitest and testing-library to support v5. It seems that having Also made a sample repo to reproduce the issue https://github.com/peterpeterparker/svelte-vite-testing-library-css |
Let's use this PR to migrate to vite v6. Currently blocked because of an incompatibility in Vitest v3. |
Motivation
Svelte v5 and notably
@sveltejs/vite-plugin-svelte
uses Vite v6 in their last version. Therefore we also want to keep the pace and use those version.