farm-fe / farm

Extremely fast Vite-compatible web build tool written in Rust
https://farmfe.org
MIT License
4.4k stars 148 forks source link

[Bug Report]: Not support vite import.meta.env #1525

Open erguotou520 opened 4 days ago

erguotou520 commented 4 days ago

Steps to reproduce

  1. npm create farm test
  2. add console.log(import.meta.env.BASE_URL) in app.tsx
  3. open browser to see the result

Reproduce link

No response

What is actually happening?

log result is undefined but / is expect.

System Info

System:
    OS: macOS 12.5
    CPU: (8) arm64 Apple M1
    Memory: 149.22 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm
    pnpm: 8.5.1 - ~/Library/pnpm/pnpm
    bun: 1.1.17 - ~/.bun/bin/bun
  npmPackages:
    @farmfe/core: ^1.2.2 => 1.2.2
erguotou520 commented 4 days ago

What vite provided: https://vitejs.dev/guide/env-and-mode