Skip to content

Commit 13e7ef4

Browse files
committed
fix: add IDEA workaround
1 parent 423cb7b commit 13e7ef4

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"local-pkg": "^0.4.0",
8282
"magic-string": "^0.25.7",
8383
"minimatch": "^3.0.4",
84-
"pnpm": "^6.23.6",
8584
"resolve": "^1.20.0",
8685
"unplugin": "^0.2.21"
8786
},

pnpm-lock.yaml

+3-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/ideHelper.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@ export async function generateIdeHelper(ctx: Context, root: string, filepath: st
4444
`
4545

4646
if (getVueVersion() === 'vue3') {
47+
// @see https://youtrack.jetbrains.com/issue/WEB-48239
4748
code += `import { createApp } from "vue";
4849
4950
${lines.map(line => line[1]).join('\n')}
5051
5152
const app = createApp({});
5253
53-
${lines.map(line => `app.component('${line[0]}', ${line[0]})`).join('\n')}
54+
const Vue = app
55+
56+
${lines.map(line => `Vue.component('${line[0]}', ${line[0]});`).join('\n')}
5457
5558
app.mount("body");
5659

0 commit comments

Comments
 (0)