mirror of
https://github.com/symfony/recipes.git
synced 2026-09-20 19:46:52 +03:00
37 lines
1.1 KiB
JSON
37 lines
1.1 KiB
JSON
{
|
|
"bundles": {
|
|
"Symfony\\UX\\React\\ReactBundle": ["all"]
|
|
},
|
|
"copy-from-recipe": {
|
|
"config/": "%CONFIG_DIR%/"
|
|
},
|
|
"add-lines": [
|
|
{
|
|
"file": "webpack.config.js",
|
|
"content": "\n .enableReactPreset()",
|
|
"position": "after_target",
|
|
"target": ".splitEntryChunks()"
|
|
},
|
|
{
|
|
"file": "assets/app.js",
|
|
"content": "import { registerReactControllerComponents } from '@symfony/ux-react';",
|
|
"position": "top",
|
|
"warn_if_missing": true
|
|
},
|
|
{
|
|
"file": "assets/app.js",
|
|
"content": "registerReactControllerComponents(require.context('./react/controllers', true, /\\.(j|t)sx?$/));",
|
|
"position": "bottom",
|
|
"warn_if_missing": true,
|
|
"requires": "symfony/webpack-encore-bundle"
|
|
},
|
|
{
|
|
"file": "assets/app.js",
|
|
"content": "registerReactControllerComponents();",
|
|
"position": "bottom",
|
|
"warn_if_missing": true,
|
|
"requires": "symfony/asset-mapper"
|
|
}
|
|
]
|
|
}
|