Code Monkey home page Code Monkey logo

Comments (4)

andy128k avatar andy128k commented on June 27, 2024

See jantimon/favicons-webpack-plugin#291

just replace const favicons = require('favicons') by const { favicons } = await import('favicons').

from favicons.

stevemarksd avatar stevemarksd commented on June 27, 2024

Thanks for the help, but after spending countless hours I fixed in 30 minutes (including creating a npm account).

I tried all kind of imports... but seems like magic. Maybe my lack of understanding of esm.

I ended up republishing with es5 and ts: https://www.npmjs.com/package/@esm-to-es5/favicons works out of the box with everything :) and no need to install @types.

from favicons.

jameswilddev avatar jameswilddev commented on June 27, 2024

I'm also having a lot of trouble with this. A lot of tooling (e.g. e2e test runners) expects you to use either CJS or MJS, not a mix of the two, and as almost everything else on NPM is CJS, I therefore cannot use any MJS packages at this time.

from favicons.

andy128k avatar andy128k commented on June 27, 2024

CJS is available since v7.0.0-beta.4

from favicons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.