Skip to content

fix(ssr): add svg-captcha to Vite SSR external config#151

Merged
legeling merged 1 commit into
legeling:mainfrom
chung1912:fix/ssr-external-svg-captcha
May 28, 2026
Merged

fix(ssr): add svg-captcha to Vite SSR external config#151
legeling merged 1 commit into
legeling:mainfrom
chung1912:fix/ssr-external-svg-captcha

Conversation

@chung1912
Copy link
Copy Markdown
Contributor

@chung1912 chung1912 commented May 27, 2026

Summary

  • Add svg-captcha to Vite SSR rollupOptions.external and ssr.external config
  • Prevents Rollup from incorrectly bundling the Node.js native dependency svg-captcha into the server bundle, which would cause build/runtime errors

Summary by CodeRabbit

发布说明

  • Chores
    • 更新了 Vite 服务端渲染构建配置中的外部依赖处理,优化了构建输出和依赖解析流程。

Review Change Stack

@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@chung1912 is attempting to deploy a commit to the legeling's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7da918ca-163b-469b-984d-ec77d9eef7b6

📥 Commits

Reviewing files that changed from the base of the PR and between 638d77c and 436432f.

📒 Files selected for processing (1)
  • apps/web/vite.server.config.ts

📝 Walkthrough

Walkthrough

Vite SSR 配置中的 svg-captcha 被添加到外部依赖列表。该模块现已在 build.rollupOptions.output.external 正则表达式和 ssr.external 数组中标记为外部化,确保其在打包和运行时不被内联。

Changes

SSR 外部依赖配置

Layer / File(s) Summary
SSR 外部依赖配置
apps/web/vite.server.config.ts
svg-captcha 被添加到 build.rollupOptions.output.external 正则表达式和 ssr.external 数组中,标记为 SSR 打包过程中的外部模块。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 一只兔子轻轻跳,
配置清单要更新,
svg-captcha 归外部,
SSR 打包更顺畅,
小改动,大稳定!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题准确概括了主要变更:在Vite SSR配置中添加svg-captcha到external配置,标题简洁明确,与changeset的核心目的完全相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

@legeling legeling merged commit 0055023 into legeling:main May 28, 2026
1 of 2 checks passed
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