Commit 0ede388
committed
improve stimulus controller template to import from correct module
Stimulus changed the location of their module from `stimulus` to `@hotwired/stimulus`.
Depending on that, the import in the controller template should change.
For `stimulus` it should be
```js
import { Controller } from "stimulus"
```
For `@hotwired/stimulus` it should be
```js
import { Controller } from "@hotwired/stimulus"
```1 parent 0965284 commit 0ede388
File tree
4 files changed
+39
-2
lines changed- docs
- lib/rails/generators/stimulus
- templates
- test/generators
4 files changed
+39
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
219 | 229 | | |
220 | 230 | | |
221 | 231 | | |
222 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
223 | 235 | | |
224 | 236 | | |
225 | 237 | | |
| |||
231 | 243 | | |
232 | 244 | | |
233 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
234 | 256 | | |
0 commit comments