Skip to content

Commit

Permalink
fix: watcher not works under components dir in windows (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannoeru authored Jul 6, 2021
1 parent d624d5e commit f289ae5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
3 changes: 1 addition & 2 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ export class Context {
setServer(server: ViteDevServer) {
this._server = server

const { globs, dirs } = this.options
const { globs } = this.options

server.watcher.add(dirs)
server.watcher
.on('unlink', (path) => {
if (!matchGlobs(path, globs))
Expand Down
9 changes: 0 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ function VitePluginComponents(options: Options = {}): Plugin {
return {
name: 'vite-plugin-components',
enforce: 'post',
config() {
return {
server: {
watch: {
disableGlobbing: false,
},
},
}
},
configResolved(config) {
if (config.plugins.find(i => i.name === 'vite-plugin-vue2'))
options.transformer = options.transformer || 'vue2'
Expand Down

0 comments on commit f289ae5

Please sign in to comment.