fix: addWatchFile doesn't work if base is specified (fixes #19792)#19794
fix: addWatchFile doesn't work if base is specified (fixes #19792)#19794sapphi-red merged 3 commits intovitejs:mainfrom
Conversation
There was a problem hiding this comment.
Thanks for the fix! Not sure which is better, but looking at other code, applying stripBase afterward might be more consistent.
Can you also add a test case in playground/transform-plugin? I think you can add playground/transform-plugin/vite.config-base.js and playground/transform-plugin/__tests__/base/transform-plugin.spec.ts. This is the convention to reuse the same test but with slightly different config (you can check other playground like playground/css/vite.config-xxx).
|
I updated the implementation and added tests. Similar to css family I moved test implementation to |
|
/ecosystem-ci run |
commit: |
|
📝 Ran ecosystem CI on
✅ analogjs, astro, histoire, ladle, nuxt, rakkas, quasar, marko, sveltekit, previewjs, qwik, react-router, vite-plugin-svelte, vite-plugin-vue, unocss, vite-plugin-pwa, vite-setup-catalogue, vitest, vite-plugin-cloudflare, vite-plugin-react-swc, vuepress, vitepress |
Description
Fixes #19792
URLs used in
updateModuleInfoare relative to base url but normalizeUrl will prepend base url unconditionally.This PR changes to not prepend base url if it's for pluginImports