Anber / wyw-in-js

MIT License
191 stars 8 forks source link

No support of Vite's `import.meta.env` #90

Open Malien opened 1 week ago

Malien commented 1 week ago

Given a simple vite starter project of:

import { css } from "@linaria/core";

console.log(import.meta.env.MODE);

document.body.className = css`
   content: ${import.meta.env.MODE}
`;

A build-time evaluation of the module yields undefined from import.meta.env.*. This breaks certain flows