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

177
Vistas
Solve web-dev-server pixi.js "import does not provide an export named 'default'" conflict

I'm trying to update an old site of mine that was using lit-element, pixi.js, and webpack to serve in dev and build. The new version of lit-element is lit and they recommend to use web-dev-server as mean to serve the code locally but when i'm trying to do so I get an error from pixi.js

https://lit.dev/docs/tools/development/ (for reference)

The requested module './../../../es6-promise-polyfill/promise.js' does not provide an export named 'Polyfill'

from what I found effectively the fill just provide an Immediately Invoked Function Expression while pixi.js is trying to do a module import

/*!
* @pixi/polyfill - v5.3.10
* Compiled Mon, 07 Jun 2021 22:37:25 UTC
*
* @pixi/polyfill is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
import { Polyfill } from 'es6-promise-polyfill';
import objectAssign from 'object-assign';

// Support for IE 9 - 11 which does not include Promises
if (!window.Promise) {
  window.Promise = Polyfill;
}

I didn't have this issue with lit-element and webpack and I'm not sure on how to solve this properly. I guess it's a bundling issue but this is really not my strength here. Switching back to webpack seems to bring a whole lot other issues. (seems to be linked to this issue Relative references must start with either "/", "./", or "../" but since the solution in it is to use web-dev-server instead of webpack, I'm running in circle)

Any advice on this issue would be really appreciated, thanks in advance.

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

0

Please try the following, it should work. If it was previously exported as default, so it may not be finding it. To further understand see SO here...

import { Polyfill } from 'es6-promise-polyfill';
// should be changed to below code
import Polyfill  from 'es6-promise-polyfill';

Bonus:

If you want to do it with web pack look here... use babel-polyfill

  1. Add via npm install --save "babel-polyfill"
  2. then add it as an entry point in your webpack.config.js:
module.exports = {
   entry: ['babel-polyfill', './app/js']
};
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