File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
packages/vue-jsx-vapor/src/core Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -100,23 +100,23 @@ export function injectHMRAndSSR(
100100 result . code = `${ result . code ! . replaceAll (
101101 `export default ` ,
102102 `const __default__ = ` ,
103- ) } \nexport default __default__`
103+ ) } \nexport default __default__; `
104104 }
105105
106106 if ( ! ssr && ! / \? v u e & t y p e = s c r i p t / . test ( id ) ) {
107107 let code = result . code
108108 let callbackCode = ``
109109 for ( const { local, exported, id } of hotComponents ) {
110110 code +=
111- `\n${ local } .__hmrId = "${ id } "` +
112- `\n__VUE_HMR_RUNTIME__.createRecord("${ id } ", ${ local } )`
111+ `\n${ local } .__hmrId = "${ id } "; ` +
112+ `\n__VUE_HMR_RUNTIME__.createRecord("${ id } ", ${ local } ); `
113113 callbackCode += `
114- __VUE_HMR_RUNTIME__.rerender(mod['${ exported } '].__hmrId, mod['${ exported } '].setup || mod['${ exported } '])`
114+ __VUE_HMR_RUNTIME__.rerender(mod['${ exported } '].__hmrId, mod['${ exported } '].setup || mod['${ exported } ']); `
115115 }
116116
117117 code += `
118118if (import.meta.hot) {
119- import.meta.hot.accept(( mod) => {${ callbackCode } \n})
119+ import.meta.hot.accept(mod => {${ callbackCode } \n });
120120}`
121121 result . code = code
122122 }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export function transformVueJsx(
2121 babelrc : false ,
2222 configFile : false ,
2323 } )
24- if ( result ?. code ) {
24+ if ( result && result . code !== code ) {
2525 return {
2626 code : result . code ,
2727 map : result . map ,
You can’t perform that action at this time.
0 commit comments