File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,14 @@ export const runtimePublicPath = '/@react-refresh'
33const reactCompRE = / e x t e n d s \s + (?: R e a c t \. ) ? (?: P u r e ) ? C o m p o n e n t /
44const refreshContentRE = / \$ R e f r e s h (?: R e g | S i g ) \$ \( /
55
6- // NOTE: this is currently exposed publicly via plugin-react
6+ // NOTE: this is exposed publicly via plugin-react
77export const preambleCode = `import { injectIntoGlobalHook } from "__BASE__${ runtimePublicPath . slice (
88 1 ,
99) } "
1010injectIntoGlobalHook(window);
1111window.$RefreshReg$ = () => {};
1212window.$RefreshSig$ = () => (type) => type;`
1313
14- // NOTE: this is exposed publicly via plugin-react
1514export const getPreambleCode = ( base : string ) : string =>
1615 preambleCode . replace ( '__BASE__' , base )
1716
Original file line number Diff line number Diff line change @@ -321,9 +321,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
321321 return [ viteBabel , viteReactRefresh ]
322322}
323323
324- /** @deprecated use getPreambleCode instead */
325324viteReact . preambleCode = preambleCode
326- viteReact . getPreambleCode = getPreambleCode
327325
328326const loadedPlugin = new Map < string , any > ( )
329327function loadPlugin ( path : string ) : any {
You can’t perform that action at this time.
0 commit comments