Skip to content

[Bug]: missing @rsbuild/core/types type reference in project template #8522

@intellild

Description

@intellild

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

  1. create a new project with npx @modern-js/create@latest myapp
  2. write code import.meta.env.DEV
  3. type error TS2339: Property env does not exist on type ImportMeta

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions