diff --git a/package.json b/package.json index be35cec6..4c1992d6 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf1e68d9..5c90a67a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,7 +28,6 @@ importers: local-pkg: ^0.4.0 magic-string: ^0.25.7 minimatch: ^3.0.4 - pnpm: ^6.23.6 resolve: ^1.20.0 rollup: ^2.60.0 ts-jest: ^27.0.7 @@ -46,7 +45,6 @@ importers: 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_rollup@2.60.0+vite@2.6.14 devDependencies: @@ -1339,7 +1337,7 @@ packages: '@babel/helper-hoist-variables': 7.14.5 '@babel/helper-module-transforms': 7.15.0 '@babel/helper-plugin-utils': 7.14.5 - '@babel/helper-validator-identifier': 7.14.9 + '@babel/helper-validator-identifier': 7.15.7 babel-plugin-dynamic-import-node: 2.3.3 transitivePeerDependencies: - supports-color @@ -1659,7 +1657,7 @@ packages: resolution: {integrity: sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.14.5 + '@babel/code-frame': 7.16.0 '@babel/generator': 7.15.0 '@babel/helper-function-name': 7.14.5 '@babel/helper-hoist-variables': 7.14.5 @@ -4656,14 +4654,6 @@ packages: supports-color: 5.5.0 dev: true - /chalk/4.1.1: - resolution: {integrity: sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - /chalk/4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -4778,7 +4768,7 @@ packages: engines: {node: '>=8.0.0', npm: '>=5.0.0'} hasBin: true dependencies: - chalk: 4.1.1 + chalk: 4.1.2 highlight.js: 10.7.3 mz: 2.7.0 parse5: 5.1.1 @@ -10217,12 +10207,6 @@ packages: - typescript dev: true - /pnpm/6.23.6: - resolution: {integrity: sha512-H6PIzO4W2zg2Jqms13uS5U3fU8yBdWk8rXcpJLjs/in+nutgVA8GGlasEAI2eAiTpc9FYJUkCklbJ4a/M36N0w==} - engines: {node: '>=12.17'} - hasBin: true - dev: false - /portfinder/1.0.28: resolution: {integrity: sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==} engines: {node: '>= 0.12.0'} diff --git a/src/core/ideHelper.ts b/src/core/ideHelper.ts index 7a31ff35..433b6c45 100644 --- a/src/core/ideHelper.ts +++ b/src/core/ideHelper.ts @@ -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");