Giter Site home page Giter Site logo

Comments (6)

rektdeckard avatar rektdeckard commented on April 25, 2024

Could be. I have no experience with Remix, but it seems to be a known limitation that ESM-only packages are not supported in server files. Have you tried forcing this into client, per this section of their docs? https://remix.run/docs/en/1.14.3/pages/gotchas#md-importing-esm-packages

This is an ESM-only package at the moment, but I will try and push a UMD build at some point that should be compatible with Remix and anything else still stuck in the pre-ESM era. It boggles the mind that we are still dealing with NodeJS hangovers like this in 2023!

from react.

hta218 avatar hta218 commented on April 25, 2024

Yeah, adding @phosphor-icons/react to the serverDependenciesToBundle array is ... somehow worked.
It still throws the error above but the server can be started (before, it kept crashing and the app couldn't be started)

Thank you for taking a look 🤝, guess I'll close this now.

from react.

vdineva avatar vdineva commented on April 25, 2024

@rektdeckard I'm experiencing similar issue in my project (not using Remix) - everything works well in the browser but our unit tests using Jest can't find the "@phosphor-icons/react" module. Seems like Jest's support for ESM modules is still in experimental phase: https://jestjs.io/docs/ecmascript-modules
When do you expect the UMD build to be available?

from react.

rektdeckard avatar rektdeckard commented on April 25, 2024

I will build and publish with the UMD bundle tomorrow @vdineva

from react.

vdineva avatar vdineva commented on April 25, 2024

@rektdeckard any update on this?

from react.

rektdeckard avatar rektdeckard commented on April 25, 2024

v2.0.8 includes a UMD build, and should be compatible with CJS-based build tooling.

from react.

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.