You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught Error: @pigment-css/react: You were trying to call "css" function without configuring your bundler. Make sure to install the bundler specific plugin and use it. @pigment-css/vite-plugin for Vite integration or @pigment-css/nextjs-plugin for Next.js integration.
Despite it being in use.
Remove the "charizardxx" UI lib and pigment-css will continue to operate just fine. The issue is for whatever reason, the pigment-css/react page is perhaps running before the vite-plugin package?
I have also tested this with nextjs and I have the same issue. (can create next repo, if requested)
Expected behavior
There should be no bundler error.
Context
I have built a custom UI library to be built installed via npm.
A minimal production of the UI library using pigment-css is here:
paulm17
changed the title
Bundler error when installing packages via npm that contain react package
Rollup: Bundler error when installing packages via npm that contain react package
Nov 12, 2024
I moved over to using tsup. I still get the same issue.
Btw, for my UI lib. I'm using yarn workspace:
Here is moving to a pnpm workspace:
Here is using a basic vite app via npmjs modules.
I've reached an impasse here as both tsup and rollup show the same issue. Both yarn and pnpm show the same issue.
Any help really appreciated! Thanks
paulm17
changed the title
Rollup: Bundler error when installing packages via npm that contain react package
Bundler error when installing packages via npm that contain react package
Nov 12, 2024
After trying all day. I decided to clone the mantine repo. Pair it down to the essentials and take 1 component and convert it to pigment-css.
It works (in dev mode). Tomorrow I will see whether I can make an npm package and see what the result is.
After that. I'll do a postmortem and see if I can find anything. I can't understand why my other repos just don't work in dev nor pushing to npm. But then I have 1 repo which does work in dev and not when pushing to npm.
I built the packages and put on NPM. Here is the result.
2 different repos, 2 different package managers, 2 different bundlers. Same result. There is definitely an issue here. It's not possible to bundle pigment-css in a UI lib.
Steps to reproduce
Clone repo: https://github.com/paulm17/charizardxx-app
Current behavior
The error:
Despite it being in use.
Remove the "charizardxx" UI lib and pigment-css will continue to operate just fine. The issue is for whatever reason, the pigment-css/react page is perhaps running before the vite-plugin package?
I have also tested this with nextjs and I have the same issue. (can create next repo, if requested)
Expected behavior
There should be no bundler error.
Context
I have built a custom UI library to be built installed via npm.
A minimal production of the UI library using pigment-css is here:
Search keywords: rollup, build process
The text was updated successfully, but these errors were encountered: