-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redirect to external site in root.tsx loader doesn't work, still calls App #256
Comments
throwing redirect does work, credit to @jacobparis |
I'm curious why returning a redirect doesn't work though. Perhaps this is a bug for Remix? |
Weirdly enough if I do this in a plain stack it seems to work.
… On 3 Jul 2023, at 20:35, Kent C. Dodds ***@***.***> wrote:
I'm curious why returning a redirect doesn't work though. Perhaps this is a bug for Remix?
—
Reply to this email directly, view it on GitHub <#256 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARHVEM46QONFGWP6A5IB3QLXOL7FVANCNFSM6AAAAAAZ4N5NBM>.
You are receiving this because you authored the thread.
|
Thanks for checking on that! We'll definitely want to figure out what it is then. |
maybe the bug is in when i replace with just one change - const BUILD_PATH = './build/index.js'
+ const BUILD_PATH = '../build/index.js' the redirect work as expected |
something wrong with sentry import path from 'path'
import { fileURLToPath } from 'url'
import express from 'express'
import chokidar from 'chokidar'
import compression from 'compression'
import morgan from 'morgan'
import address from 'address'
import closeWithGrace from 'close-with-grace'
import helmet from 'helmet'
import crypto from 'crypto'
-import {
- type RequestHandler,
- createRequestHandler as _createRequestHandler,
-} from '@remix-run/express'
+import { type RequestHandler, createRequestHandler } from '@remix-run/express'
import { wrapExpressCreateRequestHandler } from '@sentry/remix'
import { type ServerBuild, broadcastDevReady } from '@remix-run/node'
import getPort, { portNumbers } from 'get-port'
import chalk from 'chalk'
// @ts-ignore - this file may not exist if you haven't built yet, but it will
// definitely exist by the time the dev or prod server actually runs.
import * as remixBuild from '../build/index.js'
const MODE = process.env.NODE_ENV
-const createRequestHandler = wrapExpressCreateRequestHandler(
- _createRequestHandler,
-)
const BUILD_PATH = '../build/index.js' |
Hey @scefali, do you have any idea what may be causing this issue? Looks like it's only present when Sentry's wrapper is involved. |
@kentcdodds I do not but I'm having someone take a look |
@onurtemizkan something lets take a look at? This might be fixed by us merging and releasing getsentry/sentry-javascript#8415 Sorry for the trouble folks! |
Also if you could run |
We'll try and get a fix out friday or start of next week, thanks for your patience everyone. |
We've released a new version of |
Thanks a lot! |
Trying to return a redirect from the root.tsx loader doesn't redirect and tries to render the App.
See screenshots below, redirect is the only line added on a freshly installed epic-stack.
The text was updated successfully, but these errors were encountered: