Skip to content

fix(create): add @rsbuild/core/types reference to project template#8574

Open
jack-old-archive wants to merge 3 commits into
web-infra-dev:mainfrom
jack-old-archive:fix/add-rsbuild-types-reference
Open

fix(create): add @rsbuild/core/types reference to project template#8574
jack-old-archive wants to merge 3 commits into
web-infra-dev:mainfrom
jack-old-archive:fix/add-rsbuild-types-reference

Conversation

@jack-old-archive

Copy link
Copy Markdown
Contributor

Summary

The generated modern-app-env.d.ts template is missing the @rsbuild/core/types triple-slash reference, causing TypeScript errors for import.meta.env.DEV and other Rsbuild built-in environment variables in newly created projects.

This PR adds the missing reference:

 /// <reference types='@modern-js/app-tools/types' />

+/// <reference types='@rsbuild/core/types' />
Closes #8522

Related Links

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

- Fix "unkown" -> "unknown" in streaming error message
- Fix "preResovled" -> "preResolved" in comment
- Fix "createRemixReuqest" -> "createRemixRequest" function name
The generated modern-app-env.d.ts is missing the @rsbuild/core/types
reference, causing TypeScript errors for import.meta.env.DEV and
other Rsbuild built-in environment variables.

Closes web-infra-dev#8522
@changeset-bot

changeset-bot Bot commented Apr 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 104a2c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Apr 23, 2026

Copy link
Copy Markdown

Deploy Preview for modernjs-byted ready!

Name Link
🔨 Latest commit 104a2c1
🔍 Latest deploy log https://app.netlify.com/projects/modernjs-byted/deploys/6a13b2b714bf9f00080c208e
😎 Deploy Preview https://deploy-preview-8574--modernjs-byted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@caohuilin caohuilin enabled auto-merge (squash) May 25, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants