Skip to content

Commit

Permalink
fix: add IDEA workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
superbiche committed Dec 9, 2021
1 parent 423cb7b commit 13e7ef4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"local-pkg": "^0.4.0",
"magic-string": "^0.25.7",
"minimatch": "^3.0.4",
"pnpm": "^6.23.6",
"resolve": "^1.20.0",
"unplugin": "^0.2.21"
},
Expand Down
22 changes: 3 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/core/ideHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ export async function generateIdeHelper(ctx: Context, root: string, filepath: st
`

if (getVueVersion() === 'vue3') {
// @see https://youtrack.jetbrains.com/issue/WEB-48239
code += `import { createApp } from "vue";
${lines.map(line => line[1]).join('\n')}
const app = createApp({});
${lines.map(line => `app.component('${line[0]}', ${line[0]})`).join('\n')}
const Vue = app
${lines.map(line => `Vue.component('${line[0]}', ${line[0]});`).join('\n')}
app.mount("body");
Expand Down

0 comments on commit 13e7ef4

Please sign in to comment.