File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ export const avoidSourceMapOption = Symbol()
1818
1919export function addRefreshWrapper < M extends { mappings : string } > (
2020 code : string ,
21- map : M | string | undefined | typeof avoidSourceMapOption ,
21+ map : M | string | typeof avoidSourceMapOption ,
2222 pluginName : string ,
2323 id : string ,
24- ) : { code : string ; map : M | null | undefined | string } {
24+ ) : { code : string ; map : M | null | string } {
2525 const hasRefresh = refreshContentRE . test ( code )
2626 const onlyReactComp = ! hasRefresh && reactCompRE . test ( code )
2727 const normalizedMap = map === avoidSourceMapOption ? null : map
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
255255 }
256256 return addRefreshWrapper (
257257 result . code ! ,
258- result . map ?? undefined ,
258+ result . map ! ,
259259 '@vitejs/plugin-react' ,
260260 id ,
261261 )
You can’t perform that action at this time.
0 commit comments