Skip to content

perf: prebundle runtime dependencies#436

Merged
9aoy merged 4 commits intomainfrom
bundle-deps
Aug 4, 2025
Merged

perf: prebundle runtime dependencies#436
9aoy merged 4 commits intomainfrom
bundle-deps

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@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 AI review requested due to automatic review settings August 1, 2025 10:18
@netlify
Copy link
Copy Markdown

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

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

"tinypool": "^1.1.1"
},
"devDependencies": {
"chai": "^5.2.1",
Copy link

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.
},
"devDependencies": {
"chai": "^5.2.1",
"@types/chai": "^5.2.2",
Copy link

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

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.

2 participants