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

fix: Properly detect and reload changed files when using Vite's ?suffix imports #1432

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

1natsu172
Copy link
Contributor

Overview

This PR for the #1062. The user modified file path has no suffix, and the moduleIds path written in the import syntax has a suffix. So it was unmatched and dev server no-changes.

I've changed the code style a bit. If you don't like it, please modify it to your liking.

Manual Testing

  1. cd wxt-demo && pnpm dev
  2. edit & save src/entrypoints/ui.content/manual-style.css
  3. check reload and apply new styles.

Related Issue

This PR closes #1062

Copy link

netlify bot commented Feb 13, 2025

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 63d7ae8
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/67ae09bfbe847d0008f9d1dd
😎 Deploy Preview https://deploy-preview-1432--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

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

Nice, thanks for adding a test.

I've changed the code style a bit. If you don't like it, please modify it to your liking.

Nope, no changes, looks much better!

@aklinker1 aklinker1 changed the title fix: problem with HMR not working on ?suffix imports fix: Properly detect changed files when using Vite's ?suffix imports Feb 13, 2025
@aklinker1 aklinker1 changed the title fix: Properly detect changed files when using Vite's ?suffix imports fix: Properly detect and reload changed files when using Vite's ?suffix imports Feb 13, 2025
Copy link

pkg-pr-new bot commented Feb 13, 2025

Open in Stackblitz

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@1432

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@1432

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@1432

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@1432

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@1432

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@1432

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@1432

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@1432

wxt

npm i https://pkg.pr.new/wxt@1432

commit: 63d7ae8

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.98%. Comparing base (342057b) to head (63d7ae8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../wxt/src/core/utils/building/detect-dev-changes.ts 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1432      +/-   ##
==========================================
- Coverage   81.34%   80.98%   -0.37%     
==========================================
  Files         128      128              
  Lines        6284     6296      +12     
  Branches     1069     1071       +2     
==========================================
- Hits         5112     5099      -13     
- Misses       1157     1182      +25     
  Partials       15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1 aklinker1 merged commit a6a9125 into wxt-dev:main Feb 14, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS changes are not applied without ?url (HMR)
2 participants