I'm going to make a landing page with Wordpress, but I have to use this landing page into a Nuxt.js project. Is it possible?
CodePudding user response:
Even if you could somehow try to load the whole thing (with an iframe or even something more dirty like nesting the Nuxt project into Wordpress), this is probably a bad idea.
Mainly because the front page will be done with a specific set of tools, like Bootstrap, some jQuery plugins (surely Wordpress plugins too).
Nonetheless, on top of the complexity of the task, you will probably have a tremendous amount of performance hit. Having that on the initial page load is probably the worst you can do to a website then you will have to load the whole Nuxt app on top of it. All the users will be long gone already.
So, I suggest speaking with the person there and ask them to work with Vanilla HTML CSS (or the any other tools similar to yours). Then, you could maybe refactor some parts thanks to Vue (with v-for
for example).
But for maintenance, performance and use of use: you should not mix 2 totally different server side rendering tools.
Otherwise, if the communication is hard you can always replicate the whole thing thanks to some code source inspection. For a single page, this should be totally doable.