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

198
Views
NextJs importa un script externo con modulepreload y con type='module' defer

Tengo que importar scripts externos para publicidad. La empresa me envió un correo electrónico diciendo que tengo que importar estos scripts:

 <link rel='modulepreload' href='https://xy.js' /> <script type='module' defer src='https://xy.js'></script>

Ahora con nextjs estoy tratando de importar el script así:

 <Script src="https://xy.js" strategy="beforeInteractive" />

y me sale este error:

 Uncaught SyntaxError: Cannot use import statement outside a module

¿Cómo puedo importar esos scripts?

about 4 years ago · Santiago Trujillo
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!