Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Malien opened this issue Jun 20, 2024 · 1 comment
Open

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

Malien opened this issue Jun 20, 2024 · 1 comment
Labels
cat: performance 🚀 Issue is related to performance enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed needs: triage 🏷 Issue needs to be checked and prioritized

Comments

@Malien
Copy link

Malien commented Jun 20, 2024

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

@Malien Malien added the enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed label Jun 20, 2024
@github-actions github-actions bot added cat: performance 🚀 Issue is related to performance needs: triage 🏷 Issue needs to be checked and prioritized labels Jun 20, 2024
@kiprop-dave
Copy link

Is there any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: performance 🚀 Issue is related to performance enhancement: proposal 💬 Improvement of current behaviour that needs to be discussed needs: triage 🏷 Issue needs to be checked and prioritized
Projects
None yet
Development

No branches or pull requests

2 participants