Skip to content

Commit

Permalink
docs: update readme to reflect vite's deprecation of globEager (#430)
Browse files Browse the repository at this point in the history
* docs: update readme to reflect vite's deprecation of globEager

The `globEager` function was deprecated as of Vite 3.0 and has
been removed in Vite 5.0. This updates the README to use the
suggested `glob` with eager argument instead.

https://vitejs.dev/guide/migration#removed-deprecated-apis
vitejs/vite#14118

* Update method reference
  • Loading branch information
rockwellll authored Jan 17, 2024
1 parent 7d2f558 commit 369facf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/guide/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ const path = videoClips.download.path(video) // "/video_clips/5/download"
## [Stimulus Helpers](https://github.com/ElMassimo/stimulus-vite-helpers)
Use <kbd>[stimulus-vite-helpers]</kbd> to easily register all [Stimulus] controllers using [`globEager`][glob import].
Use <kbd>[stimulus-vite-helpers]</kbd> to easily register all [Stimulus] controllers using [`import.meta.glob`][glob import].
```ts
const controllers = import.meta.globEager('./**/*_controller.js')
const controllers = import.meta.glob('./**/*_controller.js', { eager: true })
registerControllers(application, controllers)
```
Expand Down

0 comments on commit 369facf

Please sign in to comment.