Skip to content

[Due for payment 2025-10-17] Remove Dev Dependencies from Production Bundle #71215

Closed

Description

@roryabraham

Proposal: Remove Dev Dependencies from Production Bundle

Background

Our production application currently consists of 44 bundles containing 4,187 modules. Analysis reveals that 5 development dependencies are inadvertently being included in production bundles that are served to users.

Problem

When our build process runs, if development dependencies get included in production bundles, then users download unnecessary code that increases load times and wastes bandwidth.

Solution

Remove the 5 development dependencies from production bundles by:
implementing MiniCssExtractPlugin for CSS handling
configuring IgnorePlugin to exclude modules only used in development
cleaning up package.json dependency classifications
setting up the proper version of React compiler for production builds
This will reduce our bundle count from 44 to 43, decrease total modules from 4,187 to 4,128, and reduce bundle size by 120kb. The following libraries will no longer be reported in production bundles:

  • css-loader
  • style-loader
  • react-is
  • react-compiler-runtime
  • @babel/runtime (moved from dev to normal dependencies to align with official documentation)

This results in slightly faster load times and reduced bandwidth costs.

Issue OwnerCurrent Issue Owner: @RachCHopkins

Activity

  1. roryabraham commented on Sep 24, 2025

    @roryabraham
    ContributorAuthor

    Created this but didn't mark it as a bug because I don't think we'll really need C+ review here

  2. melvin-bot commented on Sep 25, 2025

    @melvin-bot

    Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  3. roryabraham commented on Sep 26, 2025

    @roryabraham
    ContributorAuthor

    First attempt was reverted. Context in #71350

  4. 36 remaining items

  5. changed the title [-]Remove Dev Dependencies from Production Bundle[/-] [+][Due for payment 2025-10-17] Remove Dev Dependencies from Production Bundle[/+] on Oct 10, 2025
  6. melvin-bot commented on Oct 10, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.28-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-10-17. 🎊

    For reference, here are some details about the assignees on this issue:

    • @jayeshmangwani requires payment through NewDot Manual Requests
    • @kstroz does not require payment (Contractor)
  7. melvin-bot commented on Oct 10, 2025

    @melvin-bot

    @jayeshmangwani @RachCHopkins The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  8. melvin-bot commented on Oct 17, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    • Reviewer: @jayeshmangwani owed $250 via NewDot
    • Contributor: @kstroz is from an agency-contributor and not due payment

    BugZero Checklist (@RachCHopkins)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  9. jayeshmangwani commented on Oct 17, 2025

    @jayeshmangwani
    Contributor

    No checklist needed , this was a dev improvement

  10. RachCHopkins commented on Oct 20, 2025

    @RachCHopkins
    Contributor

    @roryabraham are there any pricetag adjustments due to those original reverted PRs?

  11. roryabraham commented on Oct 20, 2025

    @roryabraham
    ContributorAuthor

    I don't think so, no

  12. RachCHopkins commented on Oct 21, 2025

    @RachCHopkins
    Contributor

    In that case, the payment summary is correct.

    No jobs to close or contacts to complete in Upwork.

    🟢 to @jayeshmangwani to request $250 via NewDot Manual Request.

  13. moved this from AWAITING DEPLOYMENT to Done in [#whatsnext] #qualityon Oct 21, 2025
  14. twisterdotcom commented on Oct 28, 2025

    @twisterdotcom
    Contributor

    @jayeshmangwani has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-6b4c-af2a-a916-bace5bf1df01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions