-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
When setting vite.config.js as following:
import { defineConfig } from 'vite';
import solid from 'vite-plugin-solid';
// https://vite.dev/config/
export default defineConfig({
resolve: {
conditions: [], // <- Here, or any array that missed `"development|production"` condition
},
plugins: [solid()],
});And following files including circular import:
// main.js
import { Bar } from './App.jsx';
export const foo = 0;
// App.jsx
import { foo } from './main.js';
export function Bar() {
return foo;
}Then the hot reload of dev server will make Vite run into infinite loops:
01:14:18 [vite] (client) hmr update /src/App.jsx
01:14:18 [vite] (client) hmr invalidate /src/App.jsx
01:14:18 [vite] (client) hmr update /src/App.jsx
01:14:18 [vite] (client) hmr invalidate /src/App.jsx
01:14:18 [vite] (client) hmr update /src/App.jsx
01:14:18 [vite] (client) hmr invalidate /src/App.jsx
01:14:18 [vite] (client) hmr update /src/App.jsx
01:14:18 [vite] (client) hmr invalidate /src/App.jsx
01:14:18 [vite] (client) hmr update /src/App.jsx
01:14:18 [vite] (client) hmr invalidate /src/App.jsx
# [ continuing ... ]Reproducible playground
Step to reproduce:
- Open above link and wait for the startup command to complete.
- Refresh the preview browser on the right.
- Edit
src/main.jscontent and save. That's it, bug occurs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels