Skip to content

Commit

Permalink
fix: 修复windows下serve 时新增组件问题
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Feb 7, 2022
1 parent c7d07a6 commit 4723e9f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 46 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"typescript": "^4.5.5",
"unplugin-auto-import": "^0.5.11",
"unplugin-icons": "^0.13.0",
"unplugin-vue-components": "^0.17.16",
"unplugin-vue-components": "^0.17.17",
"vite": "^2.7.13",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-inspect": "^0.3.13",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

30 changes: 0 additions & 30 deletions presets/shared/watch.ts

This file was deleted.

7 changes: 0 additions & 7 deletions presets/tov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ import ViteRestart from 'vite-plugin-restart'
import vueJsx from '@vitejs/plugin-vue-jsx'
import viteCompression from 'vite-plugin-compression'
import { StoresResolver } from './shared/resolvers'
import { watchComponentCreatedWithRestart } from './shared/watch'

/**
* 监听组件文件创建重启服务,仅在 windows11 下
* 弥补 unplugin-vue-components 在 windows11 下的组件创建报错
*/
watchComponentCreatedWithRestart()

const markdownWrapperClasses =
'prose md:prose-lg lg:prose-lg dark:prose-invert text-left p-10 prose-slate prose-img:rounded-xl prose-headings:underline prose-a:text-blue-600'
Expand Down
1 change: 0 additions & 1 deletion presets/types/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ declare global {
const effectScope: typeof import('vue')['effectScope']
const EffectScope: typeof import('vue')['EffectScope']
const extendRef: typeof import('@vueuse/core')['extendRef']
const fooStore: typeof import('~/stores/fooStore')['default']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
Expand Down
2 changes: 1 addition & 1 deletion presets/types/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

declare module 'vue' {
export interface GlobalComponents {
Asdasd: typeof import('./../../src/components/asdasd.vue')['default']

}
}

Expand Down

0 comments on commit 4723e9f

Please sign in to comment.