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

evaluate: false not working / is still evaluating code #1396

Open
mgreenw opened this issue Mar 8, 2024 · 0 comments
Open

evaluate: false not working / is still evaluating code #1396

mgreenw opened this issue Mar 8, 2024 · 0 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@mgreenw
Copy link

mgreenw commented Mar 8, 2024

Environment

  • Linaria version: 5.x (haven't tried v6)
  • Bundler (+ version): Webpack v5
  • Node.js version: 20.x
  • OS: macOS

Description

When I set evaluate: false, I expect Linaria to not evaluate my source code in a vm via the babel transform, and instead to rely on the AST only to do the required transformations and CSS file generation. However, it seems like setting evaluate: false does not stop linaria from evaluating the source files, which can lead to issues if dependencies are not ready to be statically evaluated like that.

This is a really important feature for folks that don't want to or need to have dynamic JS expressions in their css template literals, and will speed up builds.

Thank you!

@mgreenw mgreenw added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Mar 8, 2024
@github-actions github-actions bot added bundler: webpack 📦 Issue is related to webpack bundler and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

1 participant