Skip to content

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

Open
Jack-sh1 wants to merge 2 commits into
web-infra-dev:mainfrom
Jack-sh1:fix/add-rsbuild-types-reference
Open

fix(create): add @rsbuild/core/types reference to project template#8574
Jack-sh1 wants to merge 2 commits into
web-infra-dev:mainfrom
Jack-sh1:fix/add-rsbuild-types-reference

Conversation

@Jack-sh1
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
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

⚠️ No Changeset found

Latest commit: 8a99481

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
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

Deploy Preview for modernjs-byted ready!

Name Link
🔨 Latest commit 8a99481
🔍 Latest deploy log https://app.netlify.com/projects/modernjs-byted/deploys/69e9f41942de3e000845a531
😎 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: 99 (no change 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

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

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.

1 participant