-
Hi there, Sorry if the answer is trivial, as I have some troubles understanding the intrications between PHP and JS on the webpack encore side. I'm building a Symfony(5.3)/React(with TS actually) small project, and I search to use webpack Encore to create the react part without using twig. Everywhere I look for tutorials and help is about using twig for the base.html.twig template and therefor a home controller to give access to. So I was wondering if, like I can do for a front only app (npx create-react-app), having just builded static files to serve.
Thank you in advance to help me finding a angle of approach ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Webpack encore will generate all the files (manifest, entrypoint, js etc.) you can you use it as it but you will have to "get" the generated file yourself (or with plugins but in the front side) |
Beta Was this translation helpful? Give feedback.
Webpack encore will generate all the files (manifest, entrypoint, js etc.) you can you use it as it but you will have to "get" the generated file yourself (or with plugins but in the front side)
The integration with Twig allow you to easily "include" all those files in your template (with
encore_entry_link_tags
orencore_entry_script_tags
)