Releases: danieldiekmeier/stimulus-controller-resolver
v.3.1.0
Thanks for using StimulusControllerResolver! In this version, we have one new feature:
- Make controller attribute name dynamic: It's possible to adjust Stimulus's schema, for example to use
data-stimulus-controller="..."
instead of the defaultdata-controller
. (Docs: https://stimulus.hotwired.dev/handbook/installing#overriding-attribute-defaults) StimulusControllerResolver will now automatically recognise the configured schema.
Many thanks to @drjayvee for contributing this feature!
v3.0.0
No changes from v3.0.0-beta.2, just removing the beta
tag!
v3.0.0-beta.2
- Remove accidental console.log ff79de2
v3.0.0-beta.1
This version adds a new createViteGlobResolver
function, which allows you to use Vite's Glob Import:
import { Application } from "@hotwired/stimulus"
import StimulusControllerResolver, { createViteGlobResolver } from 'stimulus-controller-resolver'
const application = Application.start()
StimulusControllerResolver.install(application, createViteGlobResolver(
import.meta.glob('../controllers/*-controller.js'),
import.meta.glob('../../components/**/*-controller.js')
))
We're also no longer using microbundle
, so going forward this package is ESM only. I think this should be fine because I think this package is only used in conjunction with bundlers, anyway? We'll see!
v2.0.1
- Update README.md to reflect the latest changes ecbbdbf
v2.0.0: Update to @hotwired/stimulus v3
This is a major update, because this package now only supports the new @hotwired/stimulus package. It no longer supports the legacy package that was called @stimulus/mutation-observers
, as this package has been rolled into Stimulus itself.
This means, you should
- Read the Stimulus v3 Announcement: https://world.hey.com/hotwired/stimulus-3-c438d432
npm uninstall stimulus @stimulus/mutation-observers
npm install @hotwired/stimulus
- Update your imports to import from
'@hotwired/stimulus'
instead of'stimulus'
, for example:
- import { Application } from '@stimulus'
+ import { Application } from '@hotwired/stimulus'
import StimulusControllerResolver from 'stimulus-controller-resolver'
const application = Application.start()
v1.1.1
This is a tiny upgrade that fixes the version of @stimulus/mutation-observers
that is allowed as a peer dependency. It now allows 1.x
and 2.x
, so it works with Stimulus v2. Thanks to @brendon for bringing this to my attention in #5. I encourage everyone to upgrade.
Thanks for using Stimulus Controller Resolver!
Skip Controllers
If you return a falsy value from your resolver function, we won't try to register it. This behavior resulted in some weird edge cases. I hope the new behavior makes this library a bit more flexible. (This is a result of the discussion at #4)