Anber / wyw-in-js

MIT License
228 stars 16 forks source link

vite + react: PURE annotation that Rollup cannot interpret #74

Open BPreisner opened 5 months ago

BPreisner commented 5 months ago

Packages:

Description

There is an issue with simple styled interpolation upon vite build.

image

When building with Vite:

image

I was trying to switch from styled-components to linaria for our components library and this error is populated for every interpolation in the project. I worry that it's not just a polite warning and may lead to breaking something later.

Reproducible Demo

https://stackblitz.com/edit/vitejs-vite-gfwqu5?file=src%2FApp.tsx

$ npm run build

(There is no issue when running dev command)