Skip to content

perf: prebundle runtime dependencies #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 4, 2025
Merged

perf: prebundle runtime dependencies #436

merged 4 commits into from
Aug 4, 2025

Conversation

9aoy
Copy link
Contributor

@9aoy 9aoy commented Aug 1, 2025

Summary

Prebundle runtime dependencies to speed up runtime.

before:
image

after:
image

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Copilot Copilot AI review requested due to automatic review settings August 1, 2025 10:18
Copy link

netlify bot commented Aug 1, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit b87223d
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/688c983773e5bf0008dca822
😎 Deploy Preview https://deploy-preview-436--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements prebundling of runtime dependencies to improve application startup performance. The changes move several packages from runtime dependencies to bundled dependencies and update the build configuration accordingly.

  • Updated rslib configuration to bundle specific runtime dependencies using the bundledPackages option
  • Moved testing-related dependencies from dependencies to devDependencies in package.json
  • Added license information for newly bundled packages

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/core/rslib.config.ts Updated DTS bundle configuration to specify packages for prebundling
packages/core/package.json Moved chai and vitest packages from runtime to dev dependencies
packages/core/LICENSE Added license notices for bundled packages
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

"pathe": "^2.0.3",
"std-env": "^3.9.0",
"tinypool": "^1.1.1"
},
"devDependencies": {
"chai": "^5.2.1",
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving 'chai' from dependencies to devDependencies may break runtime functionality if the package is used at runtime. Verify that 'chai' is only used in tests or development environments.

Copilot uses AI. Check for mistakes.

"pathe": "^2.0.3",
"std-env": "^3.9.0",
"tinypool": "^1.1.1"
},
"devDependencies": {
"chai": "^5.2.1",
"@types/chai": "^5.2.2",
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving '@types/chai' from dependencies to devDependencies may cause TypeScript compilation issues if these types are exposed in the public API. Verify that these types are not part of the public interface.

Suggested change
"@types/chai": "^5.2.2",
"tinypool": "^1.1.1",
"@types/chai": "^5.2.2"
},
"devDependencies": {
"chai": "^5.2.1",

Copilot uses AI. Check for mistakes.

'@vitest/expect',
'@vitest/snapshot',
'@vitest/utils',
'@vitest/spy',
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package '@vitest/spy' is listed in bundledPackages but was not moved from dependencies to devDependencies in package.json. This inconsistency should be addressed to ensure proper dependency management.

Copilot uses AI. Check for mistakes.

@9aoy 9aoy merged commit 389a988 into main Aug 4, 2025
18 of 19 checks passed
@9aoy 9aoy deleted the bundle-deps branch August 4, 2025 02:53
@9aoy 9aoy mentioned this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant