Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
Nuxt - How to hydrate app.js in PHP page canvas?

I need to handle one part of the webpage's canvas in PHP and another one in Nuxt. So in my php page I have set this structure.

<!-- Some php code -->
<div id="app">
  <!--I have to Inject Nuxt -->
</div>
<!-- Some php code -->

I can do it with Vue. In the header of my PHP file I load the script http://localhost:8080/js/app.js and the app Div is hydrated.

How can I do it in Nuxt ?

Do you know where are generated the nuxt files (with hot-module-replacement or with the build) ?

Thanks,

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You will not be able to plug Nuxt like Vue with a simple querySelector, because Nuxt requires a decent amount of build step. It's not as flexible as Vue because it is one solution in itself to SSR your whole project.

Best idea would be to either continue to use Vue during your migration, when all is done: upgrade Vue to Nuxt (not that hard if your code is already following some conventions, other just look how it is organized in Nuxt).

Create a standalone Nuxt app, next to your PHP website and start making HTTP calls to your headless CMS without breaking anything.

Don't waste time trying to setup some weird behavior of them running at the same time, you will lose more time IMO.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda