Giter Site home page Giter Site logo

Comments (4)

Janpot avatar Janpot commented on September 26, 2024 3

Both this issue and #9826 should be fixed by #10272.

The problem of this issue and #9826 is not that we're not providing a commonjs export. It's that we were declaring in the charts that we have a commonjs export while in reality it didn't work. It didn't work because there is no commonjs version of d3. (And we didn't build a workaround for that limitation yet as we want to spend our time building features first and take this opportunity to probe the community to see how big of a problem it would be to just not build that workaround ever)

Since module resolution amongst bundlers and custom setups these days is basically the wild west, some of them get totally confused. #10272 removes that faulty export so that modern enough bundlers don't get confused. I believe we can close these issues until the community makes a convincing case for us to add a non-broken commonjs version. i.e. Where being on a non-standard setup is justified. While there will be commonjs around for a very long time, the ratio commonjs/ESM will only decrease going forward.

(cc @alexfauquette Would it make sense to create a specific label for issues related to the charts ESM setup? It'd make it easier for me to keep tabs on them)

from mui-x.

alexfauquette avatar alexfauquette commented on September 26, 2024 1

Created charts: ESM for it 👍

from mui-x.

apedroferreira avatar apedroferreira commented on September 26, 2024

Looks like I fixed it with https://www.npmjs.com/package/@originjs/vite-plugin-commonjs.
Let me know if I should close it, I guess that other people could have the same issue so maybe something can be done from the library side.

from mui-x.

oliviertassinari avatar oliviertassinari commented on September 26, 2024

So related to #9826.

from mui-x.

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.