-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Modifying CSS or SCSS files in the Lit templates do not trigger a full reload #3243
Comments
I plugged in a community HMR module to HMR Lit elements, but the SASS issue still persisted similar to the open svelte bug linked in the description |
同样的问题,希望能解决 |
Note: this seems to have been fixed in CSS files but not SCSS files |
This is because For a workaround you could use it like below too. import 'foo.css' // inject css
import foo from 'foo.css?inline' // obtain content BTW I feel this multiple effect a bit confusing. |
Vite 4 has deprecated default imports from |
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 [email protected]: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: