We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77e345f commit 705bfc3Copy full SHA for 705bfc3
packages/plugin-vue/src/main.ts
@@ -105,7 +105,8 @@ export async function transformMain(
105
if (devServer && !ssr && !isProduction) {
106
output.push(`_sfc_main.__hmrId = ${JSON.stringify(descriptor.id)}`)
107
output.push(
108
- `__VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main)`
+ `typeof __VUE_HMR_RUNTIME__ !== 'undefined' && ` +
109
+ `__VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main)`
110
)
111
// check if the template is the only thing that changed
112
if (prevDescriptor && isOnlyTemplateChanged(prevDescriptor, descriptor)) {
0 commit comments