File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ export function startStimulusApp(context) {
26
26
}
27
27
28
28
symfonyControllers [ controllerName ] . then ( ( module ) => {
29
+ // Normalize the controller name: remove the initial @ and use Stimulus format
30
+ controllerName = controllerName . substr ( 1 ) . replace ( / _ / g, "-" ) . replace ( / \/ / g, "--" ) ;
31
+
29
32
application . register ( controllerName , module . default ) ;
30
33
} ) ;
31
34
}
Original file line number Diff line number Diff line change @@ -19,6 +19,6 @@ describe('startStimulusApp', () => {
19
19
await new Promise ( setImmediate ) ;
20
20
21
21
expect ( app . router . modules . length ) . toBe ( 1 ) ;
22
- expect ( app . router . modules [ 0 ] . definition . identifier ) . toBe ( '@ symfony/ mock-module/ mock-controller' ) ;
22
+ expect ( app . router . modules [ 0 ] . definition . identifier ) . toBe ( 'symfony-- mock-module-- mock-controller' ) ;
23
23
} ) ;
24
24
} ) ;
You can’t perform that action at this time.
0 commit comments