Skip to content

fix: deployment by disabling sourcemaps until we find a solution - #10261

Closed
NeOMakinG wants to merge 1 commit into
developfrom
fix-deploy
Closed

fix: deployment by disabling sourcemaps until we find a solution#10261
NeOMakinG wants to merge 1 commit into
developfrom
fix-deploy

Conversation

@NeOMakinG

@NeOMakinG NeOMakinG commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

Description

Disable sourcemaps so we can deploy on envs until we find a way to reduce the sourcemap size

hdwallet seems to be taking 8mb of size from the sourcemap, but when I try to extract it to its own chunk, the import order is borken

Issue (if applicable)

Spotted by @gomesalexandre on discord

Risk

Low

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

Deploying on any env is fine!

I'll deploy on neo

Engineering

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

https://github.com/shapeshift/web/actions/runs/16914093094 should be 🟢

Summary by CodeRabbit

  • Chores
    • Disabled source maps across all environments to streamline build output.
    • Produces smaller distributed assets and avoids exposing debug mappings in production.
    • May offer slight improvements in asset retrieval times; no functional or UI changes for end users.

@NeOMakinG
NeOMakinG requested a review from a team as a code owner August 12, 2025 15:54
@coderabbitai

coderabbitai Bot commented Aug 12, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The Vite build configuration was updated to always disable sourcemaps by setting build.sourcemap to false, removing any mode- or environment-based variability. No other configuration logic or exports were changed.

Changes

Cohort / File(s) Summary
Build config
vite.config.mts
Replaced mode/env-driven build.sourcemap value with a constant false, disabling sourcemaps across all environments.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I nibbled the map, bit by bit—gone!
No crumbs of source for dawn to yawn.
The build now hops without a trace,
Footprints hidden, swift in pace.
Thump-thump! The bundle’s light and tight—
A carrot-clean, nocturnal flight. 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-deploy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c836b46 and 54b342c.

📒 Files selected for processing (1)
  • vite.config.mts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*

📄 CodeRabbit Inference Engine (.cursor/rules/naming-conventions.mdc)

**/*: ALWAYS use appropriate file extensions
Flag files without kebab-case

Files:

  • vite.config.mts
🧠 Learnings (1)
📓 Common learnings
Learnt from: NeOMakinG
PR: shapeshift/web#10231
File: src/components/AssetSearch/components/AssetList.tsx:2-2
Timestamp: 2025-08-08T15:00:49.838Z
Learning: Project shapeshift/web: NeOMakinG prefers avoiding minor a11y/UI nitpicks (e.g., adding aria-hidden to decorative icons in empty states like src/components/AssetSearch/components/AssetList.tsx) within feature PRs; defer such suggestions to a follow-up instead of blocking the PR.
Learnt from: NeOMakinG
PR: shapeshift/web#10231
File: src/components/MultiHopTrade/components/TradeInput/components/HighlightedTokens.tsx:14-14
Timestamp: 2025-08-08T15:00:22.292Z
Learning: In shapeshift/web reviews for NeOMakinG, avoid nitpicks to change deep-relative imports to '@/…' alias paths within feature/non-refactor PRs; defer such style-only changes to a dedicated follow-up refactor unless they fix an issue.
Learnt from: gomesalexandre
PR: shapeshift/web#10232
File: packages/unchained-client/openapitools.json:61-61
Timestamp: 2025-08-08T10:23:16.829Z
Learning: In shapeshift/web, for temporary “monkey patch” PRs (e.g., packages/unchained-client/openapitools.json using jsDelivr CDN refs like cosmos/mayachain), gomesalexandre is fine with branch-based URLs and does not want SHA pinning. Treat this as a scoped exception to their general preference for pinned dependencies/refs.
🔇 Additional comments (2)
vite.config.mts (2)

173-174: Sourcemaps disabled globally — aligns with the objective to unblock deployments

Setting build.sourcemap to false (Line 173) is a safe, low-risk way to reduce build artifacts and should resolve deployment blockers from oversized maps.


138-139: Verify CI sourcemap upload and symbolication

I ran searches for Sentry CLI usage, sourcemap upload flags, Sentry env vars, and Vite Sentry plugins but didn’t find any references in the repo. However, disabling sourcemaps in Vite (Line 173) could still impact external CI steps that upload maps and perform symbolication.

Please manually verify your CI pipelines (e.g., .github/workflows/, ci/, etc.) to ensure there are no lingering sentry-cli upload-sourcemaps or similar steps. If such steps exist, you may want to:

  • Wrap them in an environment‐flag check (for example, only run when SOURCEMAPS=true).
  • Update documentation or alert stakeholders about the reduced quality of stack traces with sourcemaps disabled.

Comment thread vite.config.mts
Comment thread vite.config.mts
},
minify: mode === 'development' && !process.env.DEPLOY ? false : 'esbuild',
sourcemap: mode === 'development' && !process.env.DEPLOY ? 'inline' : true,
sourcemap: false,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should still have the sourcemaps for debugging in local dev

Suggested change
sourcemap: false,
sourcemap: mode === 'development' && !process.env.DEPLOY ? 'inline' : false,

@kaladinlight

Copy link
Copy Markdown
Member

#10263 this should do the trick. Deploying and not seeing anything weird if you want to take a quick second look

@NeOMakinG

Copy link
Copy Markdown
Contributor Author

#10263 this should do the trick. Deploying and not seeing anything weird if you want to take a quick second look

Thanks for diving into this, closing it

@NeOMakinG NeOMakinG closed this Aug 13, 2025
@kaladinlight
kaladinlight deleted the fix-deploy branch May 15, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants