Skip to content

Commit

Permalink
Workaround for Vite bug watching every page if you use negated patter…
Browse files Browse the repository at this point in the history
…ns (#52)
  • Loading branch information
Jade-GG committed May 31, 2023
1 parent 4d16464 commit afb8433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/components.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(() => {
const components = {
// Eager load all components not ending with .lazy.vue
...import.meta.glob(['./components/*.vue', '!./components/*.lazy.vue'], { eager: true, import: 'default' }),
// Eager load all components not containing an extra . in the name
...import.meta.glob(['./components/*([^\.]).vue'], { eager: true, import: 'default' }),
// Lazy load all components not ending with .lazy.vue
...import.meta.glob(['./components/*.lazy.vue'], { eager: false, import: 'default' })
};
Expand Down

0 comments on commit afb8433

Please sign in to comment.