Skip to content

Commit f289ae5

Browse files
authored
fix: watcher not works under components dir in windows (#87)
1 parent d624d5e commit f289ae5

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/context.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ export class Context {
3838
setServer(server: ViteDevServer) {
3939
this._server = server
4040

41-
const { globs, dirs } = this.options
41+
const { globs } = this.options
4242

43-
server.watcher.add(dirs)
4443
server.watcher
4544
.on('unlink', (path) => {
4645
if (!matchGlobs(path, globs))

src/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ function VitePluginComponents(options: Options = {}): Plugin {
1212
return {
1313
name: 'vite-plugin-components',
1414
enforce: 'post',
15-
config() {
16-
return {
17-
server: {
18-
watch: {
19-
disableGlobbing: false,
20-
},
21-
},
22-
}
23-
},
2415
configResolved(config) {
2516
if (config.plugins.find(i => i.name === 'vite-plugin-vue2'))
2617
options.transformer = options.transformer || 'vue2'

0 commit comments

Comments
 (0)