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

202
Views
Next.js HMR no funciona cuando external react y react-dom

Tengo una aplicación que requería window.React y window.ReactDOM , así que modifiqué el campo externo del paquete web en next.config.js de esta manera:

 // next.config.js /** @type {import('next').NextConfig} */ module.exports = { reactStrictMode: true, webpack(config, { isServer }) { if (!isServer) { config.externals = { next: 'next', react: 'React', 'react-dom': 'ReactDOM' } } return config; } }

Pero cuando hago esto, la página no puede recargarse en caliente al editar el código. Y no hay advertencia ni error en el panel de la consola de Chrome. Solo cuando actualizo manualmente la página, el código más reciente también puede funcionar.

Reproducir repositorio: https://github.com/MrKou47/nextjs-hmr-notwork-demo

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!