File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,8 @@ var _controllers = _interopRequireDefault(require("./webpack/loader!@symfony/sti
2121
2222function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { "default" : obj } ; }
2323
24- // this import is be replaced by the NormalModuleReplacementPlugin
25- // to point to the real controllers.json file
26- // See create-controllers-module.js
24+ // The @symfony /stimulus-bridge/controllers.json should be changed
25+ // to point to the real controllers.json file via a Webpack alias
2726function startStimulusApp ( context ) {
2827 var application = _stimulus . Application . start ( ) ;
2928
Original file line number Diff line number Diff line change @@ -41,12 +41,8 @@ module.exports = function createControllersModule(config) {
4141 var webpackMode = controllerUserConfig . webpackMode ;
4242 controllerContents += "\n '" + controllerReference + '\': import(/* webpackMode: "' + webpackMode + '" */ \'' + controllerMain + "')," ;
4343
44- if ( 'undefined' !== typeof controllerUserConfig . autoimport ) {
45- for ( var autoimport in controllerUserConfig . autoimport ) {
46- if ( ! controllerUserConfig . autoimport [ autoimport ] ) {
47- continue ;
48- }
49-
44+ for ( var autoimport in controllerUserConfig . autoimport || [ ] ) {
45+ if ( controllerUserConfig . autoimport [ autoimport ] ) {
5046 autoImportContents += "import '" + autoimport + "';\n" ;
5147 }
5248 }
Original file line number Diff line number Diff line change @@ -55,12 +55,8 @@ module.exports = function createControllersModule(config) {
5555 controllerMain +
5656 "')," ;
5757
58- if ( 'undefined' !== typeof controllerUserConfig . autoimport ) {
59- for ( let autoimport in controllerUserConfig . autoimport ) {
60- if ( ! controllerUserConfig . autoimport [ autoimport ] ) {
61- continue ;
62- }
63-
58+ for ( let autoimport in controllerUserConfig . autoimport || [ ] ) {
59+ if ( controllerUserConfig . autoimport [ autoimport ] ) {
6460 autoImportContents += "import '" + autoimport + "';\n" ;
6561 }
6662 }
You can’t perform that action at this time.
0 commit comments