Skip to content

Commit 1cd4afc

Browse files
committed
chore: transform compileSync to compileAsync
1 parent bfc1531 commit 1cd4afc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/vite/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import HelloWorld from './components/HelloWorld.vue'
55
<template>
66
<div>
77
<el-button>Default</el-button>
8-
<el-button type="primary">Primary</el-button>
8+
<el-button type="primary">2222343434343242334234</el-button>
99
<el-button type="success">Success</el-button>
1010
<el-button type="info">Info</el-button>
1111
<el-button type="warning">Warning</el-button>

src/core/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,12 @@ export const plugin = createUnplugin<Options | undefined, false>(
363363
return query.vue || isVueFile(id)
364364
},
365365

366-
load(id) {
366+
async load(id) {
367367
const { query } = parseVueRequest(id)
368368
if (query.vue) {
369369
const cleanedId = cleanId(id)
370370
const code = fs.readFileSync(cleanedId, 'utf-8')
371-
const compileResult = compiler.compileSync(code, {
371+
const compileResult = await compiler.compileAsync(code, {
372372
id: cleanedId,
373373
filename: cleanedId,
374374
})

0 commit comments

Comments
 (0)