Skip to content

this.addWatchFile does not work as expected if base url is specified #19792

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

Closed
7 tasks done
anatawa12 opened this issue Apr 4, 2025 · 0 comments · Fixed by #19794
Closed
7 tasks done

this.addWatchFile does not work as expected if base url is specified #19792

anatawa12 opened this issue Apr 4, 2025 · 0 comments · Fixed by #19794
Labels
feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@anatawa12
Copy link
Contributor

Describe the bug

this.addWatchFile with absolute path / id does not actually watch file specified if base url path is specified.

When we removed the base url, it works.

Reproduction

https://github.com/anatawa12/add-watch-file-test-base-url.git

Steps to reproduce

npm install and then npm run dev, then open with your browser, and then edit test.txt.
After auto refresh we should see updated test.txt contents, but actually not.

System Info

System:
    OS: macOS 15.3.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 146.77 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.6.0 - /opt/n/bin/node
    Yarn: 1.22.22 - /opt/n/bin/yarn
    npm: 10.8.2 - /opt/n/bin/npm
    pnpm: 9.15.5 - /opt/n/bin/pnpm
  Browsers:
    Chrome: 134.0.6998.166
    Edge: 134.0.3124.95
    Safari: 18.3
  npmPackages:
    vite: ^6.2.0 => 6.2.5 

-----
I generally use Firefox but envinfo doesn't provide information. My Firefox version is 136.0.2 (aarch64)

Used Package Manager

npm

Logs

No response

Validations

anatawa12 added a commit to anatawa12/misskey that referenced this issue Apr 4, 2025
syuilo pushed a commit to misskey-dev/misskey that referenced this issue Apr 4, 2025
* refactor: add MarkerIdAssigner instead of processVueFile and remove transformedCodeCache object

* chore: add minimatch, a glob matcher

* chore: expose MarkerIdAssigner from plugin

* Revert "chore: expose MarkerIdAssigner from plugin"

This reverts commit 88c6d82.

* chore: add plugin to generate virtual module

* chore: parse inlining earlier

* chore: use virtual module in search

* chore: use remove old generation

* chore: fix type errors

* chore: add patch to workaround vitejs/vite#19792

* chore: improve filtering files to process

* chore: rename plugin

* docs: add comment for plugin ordering

* fix: unnecessary log

* fix: spdx license header
DA-TENSHI pushed a commit to SHINANOSKEY-Projekt/SHINANOSKEY that referenced this issue Apr 5, 2025
* refactor: add MarkerIdAssigner instead of processVueFile and remove transformedCodeCache object

* chore: add minimatch, a glob matcher

* chore: expose MarkerIdAssigner from plugin

* Revert "chore: expose MarkerIdAssigner from plugin"

This reverts commit 88c6d82.

* chore: add plugin to generate virtual module

* chore: parse inlining earlier

* chore: use virtual module in search

* chore: use remove old generation

* chore: fix type errors

* chore: add patch to workaround vitejs/vite#19792

* chore: improve filtering files to process

* chore: rename plugin

* docs: add comment for plugin ordering

* fix: unnecessary log

* fix: spdx license header
@hi-ogawa hi-ogawa added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Apr 6, 2025
ruruke pushed a commit to ruruke/rukey that referenced this issue Apr 6, 2025
* refactor: add MarkerIdAssigner instead of processVueFile and remove transformedCodeCache object

* chore: add minimatch, a glob matcher

* chore: expose MarkerIdAssigner from plugin

* Revert "chore: expose MarkerIdAssigner from plugin"

This reverts commit 88c6d82.

* chore: add plugin to generate virtual module

* chore: parse inlining earlier

* chore: use virtual module in search

* chore: use remove old generation

* chore: fix type errors

* chore: add patch to workaround vitejs/vite#19792

* chore: improve filtering files to process

* chore: rename plugin

* docs: add comment for plugin ordering

* fix: unnecessary log

* fix: spdx license header
Gingarenpo pushed a commit to Gingarenpo/G-Misskey that referenced this issue Apr 10, 2025
* refactor: add MarkerIdAssigner instead of processVueFile and remove transformedCodeCache object

* chore: add minimatch, a glob matcher

* chore: expose MarkerIdAssigner from plugin

* Revert "chore: expose MarkerIdAssigner from plugin"

This reverts commit 88c6d820f8635c35f1c15b4aac0987075d7cf8aa.

* chore: add plugin to generate virtual module

* chore: parse inlining earlier

* chore: use virtual module in search

* chore: use remove old generation

* chore: fix type errors

* chore: add patch to workaround vitejs/vite#19792

* chore: improve filtering files to process

* chore: rename plugin

* docs: add comment for plugin ordering

* fix: unnecessary log

* fix: spdx license header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants