diff --git a/app/assets/app.js b/app/assets/app.js index bb0a6aa..0c5321f 100644 --- a/app/assets/app.js +++ b/app/assets/app.js @@ -9,4 +9,4 @@ import './styles/app.css'; // start the Stimulus application -import './bootstrap'; +import './stimulus/bootstrap'; diff --git a/app/assets/bootstrap.js b/app/assets/stimulus/bootstrap.js similarity index 100% rename from app/assets/bootstrap.js rename to app/assets/stimulus/bootstrap.js diff --git a/app/assets/controllers.json b/app/assets/stimulus/controllers.json similarity index 100% rename from app/assets/controllers.json rename to app/assets/stimulus/controllers.json diff --git a/app/assets/controllers/hello_controller.js b/app/assets/stimulus/controllers/hello_controller.js similarity index 90% rename from app/assets/controllers/hello_controller.js rename to app/assets/stimulus/controllers/hello_controller.js index e847027..3f88362 100644 --- a/app/assets/controllers/hello_controller.js +++ b/app/assets/stimulus/controllers/hello_controller.js @@ -11,6 +11,6 @@ import { Controller } from '@hotwired/stimulus'; */ export default class extends Controller { connect() { - this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js'; + this.element.textContent = 'Hello Stimulus! Edit me in assets/stimulus/controllers/hello_controller.js'; } } diff --git a/app/webpack.config.js b/app/webpack.config.js index dad3306..cf18411 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -26,7 +26,7 @@ Encore .addEntry('vue', './assets/vue/index.js') // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) - .enableStimulusBridge('./assets/controllers.json') + .enableStimulusBridge('./assets/stimulus/controllers.json') // When enabled, Webpack "splits" your files into smaller pieces for greater optimization. .splitEntryChunks()