A
A
Andrew2020-08-25 20:17:21
1C-Bitrix
Andrew, 2020-08-25 20:17:21

What is the best option for integrating Vue.js and Nuxt with Bitrix?

There is a site, almost finished, made on Vue.js + Nuxt (there is even something similar to SPA), it needs to be pulled on Bitrix to be administrated, etc.
Site - a corporate site with a catalog, complex search, etc.
Having opened what Nuxt collected - I realized "something went wrong." The front that made up the project is a beginner, and I have not seen this beast in my eyes until today. It is not advisable to pull exhaust from Nuxt onto Bitrix (IMHO), because any content should be changed from the admin panel.
We need recommendations from those who stepped on a similar rake, worked with such bundles, ways out of the situation.
There are several options:

  • rebuild the project on Vue.js using webpack, it is expected that I will get a static layout and stretch it, but I need to rewrite the code on vue (Nuxt appears in some places), and this time (
  • rewrite in pure vue and integrate using bitrix, it has functionality, but it has its own ambushes, when components are made in vue - this is one thing, but when the whole site ...
  • take what Nuxt issued and ask bitrix json - s
  • considering WP REST API, but it may not be approved by management
  • For Bitrix (site management), REST somehow works crutch, on B24 - out of the box, but I haven’t tried it myself
  • your option.

PS
don’t offer laravel, I still need to grow up to it
Nuxt has assembled a ready-made application, and “programming it” and pulling it on the CMS is a bit of a perversion

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Yushkevich, 2020-09-03
@yushkevichv

Spa and Bitrix “out of the box” have never been friends and are not friends now (and it is unlikely that anything will change).
Not all Vue components can get into Bitrix in the form of layout, you need to take a closer look at the site.
In general, I hope you have already realized your architectural mistakes of the “do first, think later” approach, so I will give advice on minimizing pain.
- choose what you understand better and what you are ready to rewrite.
- the best way is to communicate with nuxt via api. But API should have a normal versioning architecture, spa should be able to ssr and there should be no problems with meta tags. Content management remains perfectly in the admin area.
- if there are difficulties with the method above, do a static layout. Wherever you can pack the entire layout into a vue component, do it. But check all scenarios. Otherwise - take a simple html and implement.
Unfortunately, this is the path of pain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question