Skip to content

chore: add vinext as dev server - #32559

Merged
hyoban merged 36 commits into
mainfrom
2-25-vinext
Mar 1, 2026
Merged

hyoban merged 36 commits into
mainfrom
2-25-vinext

Conversation

@hyoban

@hyoban hyoban commented Feb 25, 2026 •

Copy link
Copy Markdown
Member

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

fixes #32558

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

Copilot AI review requested due to automatic review settings February 25, 2026 03:01
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added the web This relates to changes on the web. label Feb 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds vinext as an alternative development server for the web workspace. Vinext is a Vite-based dev server that can run Next.js applications. The changes consolidate Vite and Vitest configurations into a single file, add vinext-specific workaround plugins, and introduce new npm scripts for vinext-based development, build, and start workflows.

Changes:

  • Consolidated vitest.config.ts into vite.config.ts with mode-based plugin loading
  • Added vinext package and related dependencies (image-size, @mdx-js/rollup, react-server-dom-webpack, @vitejs/plugin-rsc)
  • Created custom Vite plugins to patch vinext's Google Font, image metadata, and constants shims
  • Modified next.config.ts to use direct process.env access instead of centralized env object
  • Changed API_PREFIX default from localhost to cloud.dify.ai
  • Updated test file to use useRouter mock instead of AppRouterContext

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
web/vite.config.ts Added vinext plugins, merged vitest config, added conditional plugin loading based on mode
web/vitest.config.ts Deleted - configuration merged into vite.config.ts
web/package.json Added vinext scripts (dev:vinext, build:vinext, start:vinext) and dependencies
web/pnpm-lock.yaml Added dependency entries for vinext and related packages
web/next.config.ts Replaced centralized env imports with direct process.env access
web/config/index.ts Changed API_PREFIX default from localhost:5001 to cloud.dify.ai
web/app/components/header/account-dropdown/index.spec.tsx Migrated from AppRouterContext to useRouter mock
Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/config/index.ts Resolved
Comment thread web/next.config.ts Resolved
Comment thread web/package.json Resolved
Comment thread web/vite.config.ts Resolved
Comment thread web/vite.config.ts Resolved
Copilot AI review requested due to automatic review settings February 25, 2026 03:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/next.config.ts Resolved
Comment thread web/package.json Resolved
Comment thread web/package.json Resolved
Copilot AI review requested due to automatic review settings February 25, 2026 03:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/next.config.ts Resolved
Copilot AI review requested due to automatic review settings February 25, 2026 05:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/vite.config.ts Resolved
Comment thread web/package.json Resolved
Comment thread web/package.json Resolved
Copilot AI review requested due to automatic review settings February 25, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/vite.config.ts Resolved
Comment thread web/package.json Resolved
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyoban
hyoban marked this pull request as draft February 27, 2026 12:04
Copilot AI review requested due to automatic review settings February 28, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/vite.config.ts Resolved
Copilot AI review requested due to automatic review settings February 28, 2026 06:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/vite.config.ts Resolved
Comment thread web/package.json Resolved
@hyoban
hyoban marked this pull request as ready for review February 28, 2026 09:48
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Feb 28, 2026
Copilot AI review requested due to automatic review settings February 28, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/vite.config.ts Resolved
Comment thread web/vite.config.ts Resolved
Comment thread web/package.json Resolved
Comment thread web/package.json Resolved
@hyoban
hyoban merged commit eb66d36 into main Mar 1, 2026
25 checks passed
@hyoban
hyoban deleted the 2-25-vinext branch March 1, 2026 01:54
@hjlarry hjlarry mentioned this pull request Mar 1, 2026
5 tasks done
@hyoban hyoban mentioned this pull request Mar 3, 2026
4 of 5 tasks
Ssazurov pushed a commit to Ssazurov/dify that referenced this pull request Aug 8, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Chore] Add vinext as dev server

3 participants