When setting a base property in vite.config.ts other than the default, HMR does not reflect the changes. Vite logs [vite] hmr update (modified file), but there is no update at all.
Config example
import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';
export default defineConfig({
base: '/test/',
plugins: [react()],
});
Notes
This same scenario works as expected when using the babel-based plugin @vitejs/plugin-react.
Issue
When setting a base property in
vite.config.ts
other than the default, HMR does not reflect the changes. Vite logs[vite] hmr update (modified file)
, but there is no update at all.Config example
Notes
This same scenario works as expected when using the babel-based plugin
@vitejs/plugin-react
.