Skip to content

refactor: update assets plugin for better tree shake#3891

Merged
pi0 merged 4 commits intonitrojs:mainfrom
hi-ogawa:12-22-chore_deps_update_assets_plugin_for_better_tree_shake
Dec 22, 2025
Merged

refactor: update assets plugin for better tree shake#3891
pi0 merged 4 commits intonitrojs:mainfrom
hi-ogawa:12-22-chore_deps_update_assets_plugin_for_better_tree_shake

Conversation

@hi-ogawa
Copy link
Copy Markdown
Contributor

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I've moved the package to a dedicated repository https://github.com/hi-ogawa/vite-plugin-fullstack and adjusted package exports so that assetsPlugin can be imported on its own without srvx.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 22, 2025

@hi-ogawa is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 22, 2025

📝 Walkthrough

Walkthrough

A devDependency for @hiogawa/vite-plugin-fullstack is updated from ^0.0.8 to ^0.0.11, its corresponding patch is removed from pnpm configuration, and the import path in the build plugin is adjusted to reference the new export structure.

Changes

Cohort / File(s) Summary
Dependency Version Bump
package.json
Updated devDependency "@hiogawa/vite-plugin-fullstack" from "^0.0.8" to "^0.0.11"
Patch Removal
pnpm-workspace.yaml
Removed patchedDependencies entry for '@hiogawa/vite-plugin-fullstack', disabling the local patch
Patch File
patches/@hiogawa__vite-plugin-fullstack.patch
Large rewrite of virtual module handling and asset processing logic; includes new escapeRegExp helper, refactored resolveId/load handlers with explicit filters, reworked asset transformation flow, and updated runtime asset manifest handling
Build Plugin Import
src/build/vite/plugin.ts
Changed assetsPlugin import from named import (@hiogawa/vite-plugin-fullstack) to default import from new export path (@hiogawa/vite-plugin-fullstack/assets)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • The primary project changes are mechanical (version bump, import path adjustment, patch removal)
  • Verify the new import path resolves correctly and the plugin behaves identically
  • Confirm that the upstream version 0.0.11 includes all functionality previously provided by the local patch

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title follows conventional commits format with 'refactor:' prefix and clearly describes the main change: updating the assets plugin for improved tree-shaking.
Description check ✅ Passed The PR description is related to the changeset, explaining the move to a dedicated repository and the adjustment of package exports for better tree-shaking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 00598a8 and 4cffe62.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • package.json
  • patches/@hiogawa__vite-plugin-fullstack.patch
  • pnpm-workspace.yaml
  • src/build/vite/plugin.ts
💤 Files with no reviewable changes (2)
  • patches/@hiogawa__vite-plugin-fullstack.patch
  • pnpm-workspace.yaml
🔇 Additional comments (2)
src/build/vite/plugin.ts (1)

27-27: Approve: Import path updated for better tree shaking.

The change from a named import to a default import from the /assets subpath aligns with the PR objective of enabling independent imports without requiring the full package. This should improve tree-shaking by allowing only the assets plugin to be bundled.

Ensure this import path and default export are supported in version 0.0.11 (verification requested in package.json review).

package.json (1)

82-82: Verify the package exists and is published to npm.

The package @hiogawa/vite-plugin-fullstack could not be found in the npm registry or on GitHub. Before checking version compatibility, breaking changes, or security vulnerabilities, confirm the package name is correct and that it is publicly available. If the package name or version is incorrect, update accordingly.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hi-ogawa hi-ogawa changed the title chore(deps): update assets plugin for better tree shake refactor: update assets plugin for better tree shake Dec 22, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Dec 22, 2025

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro@3891

commit: 9756b6d

@hi-ogawa hi-ogawa marked this pull request as ready for review December 22, 2025 03:58
@hi-ogawa hi-ogawa requested a review from pi0 as a code owner December 22, 2025 03:58
@pi0 pi0 merged commit 9a930b2 into nitrojs:main Dec 22, 2025
9 of 15 checks passed
@hi-ogawa hi-ogawa deleted the 12-22-chore_deps_update_assets_plugin_for_better_tree_shake branch December 22, 2025 10:00
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