Skip to content

HMR doesn't work when a base property is set in the Vite config #18

Closed
@nekusu

Description

@nekusu

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions