mui / pigment-css

Pigment CSS is a zero-runtime CSS-in-JS library that extracts the colocated styles to their own CSS files at build time.
MIT License
714 stars 36 forks source link

Does not work with tanstack start #259

Open paulm17 opened 6 hours ago

paulm17 commented 6 hours ago

Steps to reproduce

  1. Follow the instructions: https://tanstack.com/router/latest/docs/framework/react/start/getting-started
  2. Follow the instructions to setup pigment-css with vite.
  3. Create style in app/routes/index.tsx.
10:59:37 [vite] Error when evaluating SSR module /app/routes/index.tsx?tsr-split:
|- 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.
    at Module.css (file:///Users/paul/development/src/github/test/raikou_tanstack_pigment_css/node_modules/.pnpm/@pigment-css+react@0.0.24_@types+react@18.2.23_react@18.2.0_typescript@5.1.6/node_modules/@pigment-css/react/build/chunk-LPZ6XF43.mjs:15:9)
    at eval (/Users/paul/development/src/github/test/raikou_tanstack_pigment_css/apps/start/app/routes/index.tsx?tsr-split:33:42)
    at async instantiateModule (file:///Users/paul/development/src/github/test/raikou_tanstack_pigment_css/node_modules/.pnpm/vite@5.4.8_@types+node@20.5.1_terser@5.34.1/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52915:5)

Current behavior

No response

Expected behavior

No response

Context

No response

Your environment

Search keywords: tanstack start

paulm17 commented 4 hours ago

This problem doesn't occur with electron-vite. Which is actually my use case.

Ideally if I can, I want to use electron + transtack start + vite.

I'm not sure when you guys will take a look. But at any point: Tanstack Start Alpha, Beta (expected at thanksgiving) or released version. I'm more than happy to wait! Thanks