E
E
Evdokim2019-10-03 08:49:08
symfony
Evdokim, 2019-10-03 08:49:08

If you make a project on Symfony and Vue.js, then where is it recommended to store the frontend?

If you create a SPA web application based on Symfony and Vue.js, then where is it desirable to store the frontend sources and how to give them to the browser through Symfony? Is it correct to store the assets folder in the root of the Symfony project , which will contain the Vue.js project, and use WebpackEncoreBundle for this purpose?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Nizhny Novgorod, 2019-10-03
@Terras

1) Backend Symphony. Doesn't do anything for the front at all.
2) A separate project for the Front (Vue)
3) The exchange goes through rest, verification through tokens (which are generated by the front and verified by the back).
Usually the front lies on the main domain, and the back sits on something api.domain.com

A
AntonSidorenko, 2019-10-03
@AntonSidorenko

One of the suitable options is suggested in the Symfony documentation: https://symfony.com/doc/current/frontend/encore/vu... - tested on a real project. Everything else on your question is also done as in ordinary Symphony projects, without any special features.

O
OnYourLips, 2019-10-03
@OnYourLips

Is it correct to store the assets folder in the root of the Symfony project, which will contain the Vue.js project, and use WebpackEncoreBundle for this purpose?
Only if you are a masochist and like to create difficulties for yourself and then heroically fight them, complaining to everyone around.
Why try to combine two different projects in one repository and one build system?
Just keep them in different repos, use different build systems, deploy separately.

A
Andrey, 2019-10-03
@VladimirAndreev

Why not host a spa separately?
Moreover, the fronts love to stir up their cunning assemblies ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question