Version
System:
OS: macOS 15.7.4
CPU: (10) arm64 Apple M1 Max
Memory: 11.60 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Chrome: 146.0.7680.178
Firefox: 148.0
Safari: 26.3
npmPackages:
@modern-js/app-tools: 3.1.2 => 3.1.2
@modern-js/runtime: 3.1.2 => 3.1.2
@modern-js/tsconfig: 3.1.2 => 3.1.2
Details
The following type reference is missing in the default modern-app-env.d.ts, which causes import.meta.xxx to result in a type error.
/// <reference types="@rsbuild/core/types" />
Reproduce link
https://github.com/intellild/modernjs-v3-tailwind-crash
Reproduce Steps
- create a new project with
npx @modern-js/create@latest myapp
- write code
import.meta.env.DEV
- type error
TS2339: Property env does not exist on type ImportMeta