Version
System:
OS: macOS 26.4
CPU: (10) arm64 Apple M1 Pro
Memory: 1000.30 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Safari: 26.4
npmPackages:
@modern-js/app-tools: ^3.1.2 => 3.1.3
@modern-js/plugin-bff: ^3.1.2 => 3.1.3
@modern-js/runtime: ^3.1.2 => 3.1.3
@modern-js/server-runtime: ^3.1.2 => 3.1.3
@modern-js/tsconfig: ^3.1.2 => 3.1.3
Details
Redirecting to any page in an action doesn't work at all.
// some-route/page.data.ts
import { redirect } from '@modern-js/runtime/router';
export async function action() {
throw redirect('/dashboard');
// or return redirect('/dashboard')
}
Reproduce link
can be reproducible with a simple starter app
Reproduce Steps
can be reproducible with a simple starter app.
- create two pages in routes folder (page-a.tsx, page-b.tsx, page-b.data.ts)
- write an action method in
page-b.data.ts with redirect to page-a
- Run the app
- redirect to page-b
Version
System: OS: macOS 26.4 CPU: (10) arm64 Apple M1 Pro Memory: 1000.30 MB / 16.00 GB Shell: 5.9 - /bin/zsh Browsers: Safari: 26.4 npmPackages: @modern-js/app-tools: ^3.1.2 => 3.1.3 @modern-js/plugin-bff: ^3.1.2 => 3.1.3 @modern-js/runtime: ^3.1.2 => 3.1.3 @modern-js/server-runtime: ^3.1.2 => 3.1.3 @modern-js/tsconfig: ^3.1.2 => 3.1.3Details
Redirecting to any page in an
actiondoesn't work at all.Reproduce link
can be reproducible with a simple starter app
Reproduce Steps
can be reproducible with a simple starter app.
page-b.data.tswith redirect topage-a