mirror of
https://github.com/symfony/recipes.git
synced 2026-09-11 15:16:30 +03:00
59 lines
1.9 KiB
JSON
59 lines
1.9 KiB
JSON
{
|
|
"bundles": {
|
|
"Symfony\\UX\\StimulusBundle\\StimulusBundle": ["all"]
|
|
},
|
|
"copy-from-recipe": {
|
|
"assets/": "assets/"
|
|
},
|
|
"aliases": ["stimulus", "stimulus-bundle"],
|
|
"conflict": {
|
|
"symfony/webpack-encore-bundle": "<2.0",
|
|
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
|
|
},
|
|
"add-lines": [
|
|
{
|
|
"file": "webpack.config.js",
|
|
"content": [
|
|
"",
|
|
" // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)",
|
|
" .enableStimulusBridge('./assets/controllers.json')"
|
|
],
|
|
"position": "after_target",
|
|
"target": ".splitEntryChunks()"
|
|
},
|
|
{
|
|
"file": "assets/app.js",
|
|
"content": [
|
|
"import './bootstrap.js';"
|
|
],
|
|
"position": "top",
|
|
"warn_if_missing": true
|
|
},
|
|
{
|
|
"file": "assets/bootstrap.js",
|
|
"content": [
|
|
"import { startStimulusApp } from '@symfony/stimulus-bridge';",
|
|
"",
|
|
"// Registers Stimulus controllers from controllers.json and in the controllers/ directory",
|
|
"export const app = startStimulusApp(require.context(",
|
|
" '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',",
|
|
" true,",
|
|
" /\\.[jt]sx?$/",
|
|
"));"
|
|
],
|
|
"position": "top",
|
|
"requires": "symfony/webpack-encore-bundle"
|
|
},
|
|
{
|
|
"file": "assets/bootstrap.js",
|
|
"content": [
|
|
"import { startStimulusApp } from '@symfony/stimulus-bundle';",
|
|
"",
|
|
"const app = startStimulusApp();"
|
|
],
|
|
"position": "top",
|
|
"requires": "symfony/asset-mapper"
|
|
}
|
|
]
|
|
}
|