Skip to content

Commit 2135c84

Browse files
authoredFeb 11, 2025··
fix(index): move the if check earlier to avoid creating unnecessary ssr when entering return block (#523)
1 parent d057351 commit 2135c84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/plugin-vue/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,12 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
305305
},
306306

307307
load(id, opt) {
308-
const ssr = opt?.ssr === true
309308
if (id === EXPORT_HELPER_ID) {
310309
return helperCode
311310
}
312311

312+
const ssr = opt?.ssr === true
313+
313314
const { filename, query } = parseVueRequest(id)
314315

315316
// select corresponding block for sub-part virtual modules

0 commit comments

Comments
 (0)
Please sign in to comment.