-
Notifications
You must be signed in to change notification settings - Fork 247
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
Sourcemap option is ignored for client side build #2260
Comments
Not sure if this is a bug, it might be intended for security reasons, but would be great if we can optionally get the sourcemap with the build command. |
Seems like it's intended.
|
seems like this can be fixed using the build-command option:
|
@gmilon we disable client sourcemaps in production because they leak the server code. That's because a single route in remix includes both server and client logic. So the sourcemap produced includes all that server logic too. You are welcome to get around it, but just realize if that sourcemap is exposed to the world, so is likely most of your server logic. |
What is the location of your example repository?
npm create @shopify/hydrogen@latest
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
2024.4.5
What version of Remix are you using?
2.9.2
Steps to Reproduce
Generating sourcemap for client side build is helpful if we want to to setup proper error tracking with datadog or sentry:
npm create @shopify/hydrogen@latest
npm run build
Note: With remix 2.9
npx create-remix@latest
Expected Behavior
The source map for client side build should be generated like remix 2.9:
Actual Behavior
the sourcemap are only generated for server side and not client side with h2:
The text was updated successfully, but these errors were encountered: