We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51071ac commit 3473bbbCopy full SHA for 3473bbb
packages/plugin-react-swc/src/index.ts
@@ -16,6 +16,7 @@ import {
16
getPreambleCode,
17
runtimePublicPath,
18
silenceUseClientWarning,
19
+ virtualPreamblePlugin,
20
} from '@vitejs/react-common'
21
import * as vite from 'vite'
22
import { exactRegex } from '@rolldown/pluginutils'
@@ -246,6 +247,10 @@ const react = (_options?: Options): Plugin[] => {
246
247
viteCacheRoot = config.cacheDir
248
},
249
250
+ virtualPreamblePlugin({
251
+ name: '@vitejs/plugin-react-swc/preamble',
252
+ isEnabled: () => !hmrDisabled,
253
+ }),
254
]
255
}
256
0 commit comments