You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Lit template needs a full page reload since it currently does not support HMR. Modifying CSS files triggers an HMR instead of a full page reload. This means the user will have to trigger a reload manually to see the changes.
Possibly related to #2633 but the opposite way around?
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Provide a description in this issue that describes the bug.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
This is because import foo from 'foo.css' has two effects.
The first one is injecting foo.css to html. This one's hmr is handled by Vite.
The second one is exporting the content of foo.css. This one's hmr is not handled by Vite currently.
For example, this repro has style applied which is imported with import text from './style.css'.
What is difficult here is Vite needs to differentiate import 'foo.css' and import foo from 'foo.css'. Vite injects ?used to import foo from 'foo.css' during build for tree shaking. So it may be possible to implement by that approach.
Describe the bug
The Lit template needs a full page reload since it currently does not support HMR. Modifying CSS files triggers an HMR instead of a full page reload. This means the user will have to trigger a reload manually to see the changes.
Possibly related to #2633 but the opposite way around?
Reproduction
git clone git@github.com:e111077/vite-lit-element-ts-sass.git
cd vite-lit-element-ts-sass
npm install
npm run dev
localhost:3000
src/my-element.ts
and savesrc/my-element.scss
and saveSystem Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: