- Add missing
@babel/plugin-proposal-class-properties
dev dependency by @Kocal in #92 - Fix lazy-controller detection when controller contain static properties (update
acorn
ECMAScript version) by @ameotoko in #93
-
[Bug] Removing unnecessary Promise in object of controllers to be loaded. See #81.
-
Fix README: registering lazy controllers in bootstrap.js. See #76.
- Normalizing custom names "/" to "--" like normal controller names. See #72.
-
Allow the controller name to be overridden by the package or user. See #70.
-
Moved TypeScript types into the package. See #55.
- Automatically enabled Stimulus's "debug" mode when doing a dev build. You will now, while developing, see debugging information in your browser's console log! See #65.
Dropped support for stimulus
2.0, in favor of @hotwired/stimulus
version 3.
You can read about Stimulus version on its release announcement.
The most important change needed is to:
-
Remove
stimulus
from yourpackage.json
file and replace it with"@hotwired/stimulus": "^3.0"
. Also change your@symfony/webpack-encore
version to^1.7
and@symfony/stimulus-bridge
to^3.0
. After making these changes, runyarn install
. -
Update all of your controllers to replace any imports for
stimulus
with imports from@hotwired/stimulus
:
-import { Controller } from 'stimulus';
+import { Controller } from '@hotwired/stimulus';
- In
composer.json
, update anysymfony/ux-*
packages that you have installed to version^2.0
. Runcomposer up "symfony/ux-*"
. Once that finishes, runyarn install --force
.
Following the release of Webpack Encore 1.0, this release adapts the stimulus-bridge to Webpack 5 features.
Read the blog post on https://symfony.com/blog/webpack-encore-1-0-and-stimulus-bridge-2-0-released for details.
-
Webpack integration with this library has changed. If you're using Webpack Encore, you must upgrade to version 1.0.0 or higher of that library - #14.
-
Controller names were changed and normalized - #12
Before:
@symfony/ux-dropzone/dropzone
After:symfony--ux-dropzone--dropzone
-
Support for "lazy controllers" was added. By setting the
fetch
incontrollers.json
tolazy
, your controller will not be downloaded until the controller element first appears on the page. -
Support for making your own controllers "lazy" (as described above) can now be achieved by loading your controllers through the
@symfony/stimulus-bridge/lazy-controller-loader
loader and adding a/* stimulusFetch: 'lazy' */
comment above your controller.
- Support for Stimulus 1 dropped and support for Stimulus 2 added - #4.
- Initial release!