refactor: upgrade vue-macros

This commit is contained in:
三咲智子 Kevin Deng 2023-08-08 02:32:35 +08:00
parent 991034115b
commit 7079564ffe
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
4 changed files with 389 additions and 215 deletions

View file

@ -1,16 +0,0 @@
import { defineNuxtModule, useNuxt } from '@nuxt/kit'
export default defineNuxtModule({
meta: {
name: 'setup-components',
},
setup() {
const nuxt = useNuxt()
nuxt.hook('components:extend', (components) => {
for (const component of components) {
component.pascalName = component.pascalName.replace(/Setup$/, '')
component.kebabName = component.kebabName.replace(/-setup$/, '')
}
})
},
})

View file

@ -28,7 +28,6 @@ export default defineNuxtConfig({
...(isDevelopment || isWindows) ? [] : ['nuxt-security'], ...(isDevelopment || isWindows) ? [] : ['nuxt-security'],
'~/modules/emoji-mart-translation', '~/modules/emoji-mart-translation',
'~/modules/purge-comments', '~/modules/purge-comments',
'~/modules/setup-components',
'~/modules/build-env', '~/modules/build-env',
'~/modules/tauri/index', '~/modules/tauri/index',
'~/modules/pwa/index', // change to '@vite-pwa/nuxt' once released and remove pwa module '~/modules/pwa/index', // change to '@vite-pwa/nuxt' once released and remove pwa module

View file

@ -51,7 +51,7 @@
"@tiptap/suggestion": "2.0.3", "@tiptap/suggestion": "2.0.3",
"@tiptap/vue-3": "2.0.3", "@tiptap/vue-3": "2.0.3",
"@unocss/nuxt": "^0.53.4", "@unocss/nuxt": "^0.53.4",
"@vue-macros/nuxt": "^1.3.12", "@vue-macros/nuxt": "^1.6.0",
"@vueuse/core": "^10.2.1", "@vueuse/core": "^10.2.1",
"@vueuse/gesture": "2.0.0-beta.1", "@vueuse/gesture": "2.0.0-beta.1",
"@vueuse/integrations": "^10.2.1", "@vueuse/integrations": "^10.2.1",
@ -85,7 +85,7 @@
"shiki-es": "^0.2.0", "shiki-es": "^0.2.0",
"simple-git": "^3.19.1", "simple-git": "^3.19.1",
"slimeform": "^0.9.1", "slimeform": "^0.9.1",
"stale-dep": "^0.6.0", "stale-dep": "^0.7.0",
"std-env": "^3.3.3", "std-env": "^3.3.3",
"string-length": "^5.0.1", "string-length": "^5.0.1",
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log", "tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log",
@ -128,7 +128,7 @@
"tsx": "^3.12.7", "tsx": "^3.12.7",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"vitest": "^0.33.0", "vitest": "^0.33.0",
"vue-tsc": "^1.8.3" "vue-tsc": "^1.8.8"
}, },
"pnpm": { "pnpm": {
"patchedDependencies": { "patchedDependencies": {

File diff suppressed because it is too large Load diff