|
| 1 | +{ |
| 2 | + "bundles": { |
| 3 | + "Symfony\\UX\\StimulusBundle\\StimulusBundle": ["all"] |
| 4 | + }, |
| 5 | + "copy-from-recipe": { |
| 6 | + "assets/": "assets/" |
| 7 | + }, |
| 8 | + "aliases": ["stimulus", "stimulus-bundle"], |
| 9 | + "conflict": { |
| 10 | + "symfony/webpack-encore-bundle": "<2.0", |
| 11 | + "symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0" |
| 12 | + }, |
| 13 | + "add-lines": [ |
| 14 | + { |
| 15 | + "file": "webpack.config.js", |
| 16 | + "content": "\n // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)\n .enableStimulusBridge('./assets/controllers.json')", |
| 17 | + "position": "after_target", |
| 18 | + "target": ".splitEntryChunks()" |
| 19 | + }, |
| 20 | + { |
| 21 | + "file": "assets/app.js", |
| 22 | + "content": "import './bootstrap.js';", |
| 23 | + "position": "top", |
| 24 | + "warn_if_missing": true |
| 25 | + }, |
| 26 | + { |
| 27 | + "file": "assets/bootstrap.js", |
| 28 | + "content": "import { startStimulusApp } from '@symfony/stimulus-bridge';\n\n// Registers Stimulus controllers from controllers.json and in the controllers/ directory\nexport const app = startStimulusApp(require.context(\n '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',\n true,\n /\\.[jt]sx?$/\n));", |
| 29 | + "position": "top", |
| 30 | + "requires": "symfony/webpack-encore-bundle" |
| 31 | + }, |
| 32 | + { |
| 33 | + "file": "assets/bootstrap.js", |
| 34 | + "content": "import { startStimulusApp } from '@symfony/stimulus-bundle';\n\nconst app = startStimulusApp();", |
| 35 | + "position": "top", |
| 36 | + "requires": "symfony/asset-mapper" |
| 37 | + }, |
| 38 | + { |
| 39 | + "file": "templates/base.html.twig", |
| 40 | + "content": " {{ ux_controller_link_tags() }}", |
| 41 | + "position": "after_target", |
| 42 | + "target": "{% block stylesheets %}", |
| 43 | + "warn_if_missing": true |
| 44 | + } |
| 45 | + ] |
| 46 | +} |
0 commit comments