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

221
Views
Error al conectar los componentes de Vue.js a través de CDN

Escribo un blog sencillo. Hice la parte pública en PHP + JS, quiero escribir el panel de administración en PHP + Vue.js

La conexión a través de CDN no es difícil, pero ¿cómo se conectan los componentes después de eso? En la conexión normal da un error.

 Cannot use import statement outside a module

Si escribe type="module", entonces

 Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.

Aparentemente, debe haber otra manera. Lucho durante mucho tiempo, no puedo encontrar respuestas en Internet.

 Files now ADMIN |__ admin.php |__ main.js | |__ components |__ App.vue 

 // main.js const app = Vue.createApp({ data() { return { test: 11, } }, }); app.mount('#app');
 <!-- admin.php --> <!doctype html> <html lang="ru"> <head> <title>ADMIN PANEL</title> <script src="https://unpkg.com/vue@3"></script> </head> <body> <div id="app"> {{ test}} </div> </body> </html> <script src="/views/admin/main.js" type="module" ></script>

about 4 years ago · Juan Pablo Isaza
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!