Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!