group stimulus scripts in an asset subfolder
This commit is contained in:
parent
aaff9cb482
commit
0953b7ca61
@ -9,4 +9,4 @@
|
|||||||
import './styles/app.css';
|
import './styles/app.css';
|
||||||
|
|
||||||
// start the Stimulus application
|
// start the Stimulus application
|
||||||
import './bootstrap';
|
import './stimulus/bootstrap';
|
||||||
|
@ -11,6 +11,6 @@ import { Controller } from '@hotwired/stimulus';
|
|||||||
*/
|
*/
|
||||||
export default class extends Controller {
|
export default class extends Controller {
|
||||||
connect() {
|
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';
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,7 +26,7 @@ Encore
|
|||||||
.addEntry('vue', './assets/vue/index.js')
|
.addEntry('vue', './assets/vue/index.js')
|
||||||
|
|
||||||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.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.
|
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
|
||||||
.splitEntryChunks()
|
.splitEntryChunks()
|
||||||
|
Loading…
Reference in New Issue
Block a user