Commit 2ea1d2f
committed
bug #863 fix(stimulus): don't require an optional dependency if it's not used (Kocal)
This PR was merged into the main branch.
Discussion
----------
fix(stimulus): don't require an optional dependency if it's not used
Fix #861
Testing my modification on a new Symfony repository but removing `@symfony/stimulus-bridge` and `stimulus` dependencies.
If you try to use `.useStimulusBridge()` without those depdendencies installed, you now have this friendly error message:

When you install the dependencies, everything is okay:

When you don't use `.useStimulusBridge()` and don't have installed Stimulus dependencies, you have no errors anymore about those missing deps, since they are not required.
Here, the errors are coming from the app code (from the Symfony recipe) I didn't have update, but it's fine:

cc @fabpot @weaverryan
Commits
-------
7b95a1d fix(stimulus): don't require an optional dependency if it's not used2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
150 | 158 | | |
151 | 159 | | |
152 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
0 commit comments