-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(remix): Add Vite dev-mode support to Express instrumentation. #10784
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
Conversation
5fa1f6d
to
959990a
Compare
size-limit report 📦
|
ee4af65
to
7d2cc21
Compare
"@remix-run/css-bundle": "2.7.2", | ||
"@remix-run/node": "2.7.2", | ||
"@remix-run/react": "2.7.2", | ||
"@remix-run/serve": "2.7.2", | ||
"isbot": "^3.6.8", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.36.2", | ||
"@remix-run/dev": "2.0.0", | ||
"@remix-run/eslint-config": "2.0.0", | ||
"@remix-run/dev": "2.7.2", | ||
"@remix-run/eslint-config": "2.7.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also updated this to latest, to make sure the ErrorBoundary
works with the latest Remix in production
mode.
|
||
expect(hadPageNavigationTransaction).toBe(true); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove ErrorBoundary
test here, as it's not the same eventId we log, when it's reported to Sentry in dev mode.
I can confirm that the same event with a different id is reported to Sentry, but there are multiple events on dev-server mode which get deduped. We can try to address this in a follow-up PR.
Can also confirm that that test as-is passes on production mode.
7d2cc21
to
7b9dafa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onurtemizkan could you please expand the PR description to add details about what changes you made?
Woops spoke too soon, thanks for updating!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this backported onto v7 as well!
…10784) Resolves #10724 Related: #9500 Adds dev-mode support to Remix setups with Vite and Express. We currently accept Remix server `build` as an object to instrument. But Remix allows `build` as a synchronous or asynchronous function that returns the build object. Currently, it seems that functions are only used in development servers, and not in production. So, while this update slightly reduces `requestHandler` performance on dev servers, it does not on production builds. We need `build` in 2 places: 1- We instrument the loaders / actions on build, then we pass them down to the original implementations. 2- We use the `routes` inside them to create parameterised transactions. This update adds new internal wrappers around them to make sure that we don't miss out on the returned / resolved values in case `build` is a function, for both cases. This PR also adds a new E2E test application using the latest Remix version and Vite, and it runs the tests on `dev` mode. We also need a documentation update to reflect this, if it gets merged.
…10784) Resolves #10724 Related: #9500 Adds dev-mode support to Remix setups with Vite and Express. We currently accept Remix server `build` as an object to instrument. But Remix allows `build` as a synchronous or asynchronous function that returns the build object. Currently, it seems that functions are only used in development servers, and not in production. So, while this update slightly reduces `requestHandler` performance on dev servers, it does not on production builds. We need `build` in 2 places: 1- We instrument the loaders / actions on build, then we pass them down to the original implementations. 2- We use the `routes` inside them to create parameterised transactions. This update adds new internal wrappers around them to make sure that we don't miss out on the returned / resolved values in case `build` is a function, for both cases. This PR also adds a new E2E test application using the latest Remix version and Vite, and it runs the tests on `dev` mode. We also need a documentation update to reflect this, if it gets merged.
…10784) Resolves #10724 Related: #9500 Adds dev-mode support to Remix setups with Vite and Express. We currently accept Remix server `build` as an object to instrument. But Remix allows `build` as a synchronous or asynchronous function that returns the build object. Currently, it seems that functions are only used in development servers, and not in production. So, while this update slightly reduces `requestHandler` performance on dev servers, it does not on production builds. We need `build` in 2 places: 1- We instrument the loaders / actions on build, then we pass them down to the original implementations. 2- We use the `routes` inside them to create parameterised transactions. This update adds new internal wrappers around them to make sure that we don't miss out on the returned / resolved values in case `build` is a function, for both cases. This PR also adds a new E2E test application using the latest Remix version and Vite, and it runs the tests on `dev` mode. We also need a documentation update to reflect this, if it gets merged.
…10784) Resolves #10724 Related: #9500 Adds dev-mode support to Remix setups with Vite and Express. We currently accept Remix server `build` as an object to instrument. But Remix allows `build` as a synchronous or asynchronous function that returns the build object. Currently, it seems that functions are only used in development servers, and not in production. So, while this update slightly reduces `requestHandler` performance on dev servers, it does not on production builds. We need `build` in 2 places: 1- We instrument the loaders / actions on build, then we pass them down to the original implementations. 2- We use the `routes` inside them to create parameterised transactions. This update adds new internal wrappers around them to make sure that we don't miss out on the returned / resolved values in case `build` is a function, for both cases. This PR also adds a new E2E test application using the latest Remix version and Vite, and it runs the tests on `dev` mode. We also need a documentation update to reflect this, if it gets merged.
Resolves #10724
Related: #9500
Adds dev-mode support to Remix setups with Vite and Express.
We currently accept Remix server
build
as an object to instrument. But Remix allowsbuild
as a synchronous or asynchronous function that returns the build object. Currently, it seems that functions are only used in development servers, and not in production. So, while this update slightly reducesrequestHandler
performance on dev servers, it does not on production builds.We need
build
in 2 places:1- We instrument the loaders / actions on build, then we pass them down to the original implementations.
2- We use the
routes
inside them to create parameterised transactions.This update adds new internal wrappers around them to make sure that we don't miss out on the returned / resolved values in case
build
is a function, for both cases.This PR also adds a new E2E test application using the latest Remix version and Vite, and it runs the tests on
dev
mode.We also need a documentation update to reflect this, if it gets merged.