Skip to content

Commit 37182fe

Browse files
committed
feat: update for vue3
1 parent 27a4c7f commit 37182fe

9 files changed

Lines changed: 15 additions & 10 deletions

File tree

.eslintrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"no-console":0,
55
"prefer-const":0,
66
"no-prototype-builtins":0,
7-
"vue/no-parsing-error": ["error", {
8-
"invalid-first-character-of-tag-name": false
9-
}]
7+
"vue/no-parsing-error": ["error", {
8+
"invalid-first-character-of-tag-name": false
9+
}]
1010
}
1111
}

packages/core/src/compiler/template.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function compileSFCTemplate(
2121
{ code, id, type }: CompileSFCTemplateOptions,
2222
) {
2323
const s = new MagicString(code)
24+
// eslint-disable-next-line n/prefer-global/process
2425
const relativePath = normalizePath(path.relative(process.cwd(), id))
2526
const result = await new Promise((resolve) => {
2627
switch (type) {

packages/core/src/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export function parseJSXIdentifier(name: JSXIdentifier | JSXMemberExpression) {
5454
}
5555

5656
const FS_PREFIX = '/@fs/'
57+
// eslint-disable-next-line n/prefer-global/process
5758
const IS_WINDOWS = process.platform === 'win32'
5859
const queryRE = /\?.*$/s
5960
const hashRE = /#.*$/s

packages/playground/vue2/src/shim-tsx.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { VNode } from "vue"
2-
import { ComponentRenderProxy } from "@vue/composition-api"
1+
import type { VNode } from 'vue'
2+
import type { ComponentRenderProxy } from '@vue/composition-api'
33

44
declare global {
55
namespace JSX {
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
declare module "*.vue" {
2-
import Vue from "vue"
1+
declare module '*.vue' {
2+
import Vue from 'vue'
3+
34
export default Vue
45
}

packages/playground/vue2/vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { defineConfig } from 'vite'
22
import { createVuePlugin } from 'vite-plugin-vue2'
33
import Inspector from 'vite-plugin-click-to-vue-component'
4-
import { viteExternalsPlugin } from 'vite-plugin-externals'
54

65
export default defineConfig({
76
plugins: [

packages/playground/vue3/src/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import Hi from './Hi.vue'
33
import Welcome from './Welcome'
4+
45
export default {
56
name: 'App',
67
components: {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createApp } from 'vue'
22
import App from './App.vue'
33
import './index.css'
4+
45
createApp(App).mount('#app')
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
declare module "*.vue" {
2-
import { defineComponent } from "vue"
1+
declare module '*.vue' {
2+
import type { defineComponent } from 'vue'
3+
34
const Component: ReturnType<typeof defineComponent>
45
export default Component
56
}

0 commit comments

Comments
 (0)