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 189f244
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions 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 Expand Up @@ -112,4 +111,4 @@
"engines": {
"node": ">=14"
}
}
}
10 changes: 1 addition & 9 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 189f244

Please sign in to comment.