Skip to content
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

[EPIC] Webpack #29662

Open
9 tasks
desi opened this issue Jan 13, 2025 · 0 comments
Open
9 tasks

[EPIC] Webpack #29662

desi opened this issue Jan 13, 2025 · 0 comments
Labels
team-extension-platform Extension Platform team

Comments

@desi
Copy link
Contributor

desi commented Jan 13, 2025

What is this about?

This project involves consolidating multiple build processes into one which uses Webpack. This will involve addressing specific technical challenges such as MV3 script imports, LavaMoat integration, and memory constraints during bundling. The goal is to enhance developer velocity, improve application performance through optimized bundling and code splitting, and reduce long-term maintenance complexity.

Primary Outcome/Benefits:

From a stakeholders view point

  • Reduce build time.
  • Improve performance of the application itself (end user)
    • Code splitting
      • Improves our startup time at the expense of runtime.
  • Reduce maintenance cost and increase velocity of build system work
  • Reduces bundle size via tree shaking

Primary Outcome/benefits:

From a developer point of view

  • More modern build system
    • Enables more performant and compact compilation
    • Reduces bundle size (also dependent on circular dependencies)
  • We have 2 build systems we want to go back to 1
  • Reduces bundle size via tree shaking

Existing Issues that may need to be completed. We should evaluate if they do.

New Issues Needed

  • Update code splitting to fully leverage performance gains.
  • Remove base64-encoded PNGs embedded in SVG files and prevent reintroduction (quality gate).

PR Review Needed

Blockers:

Considerations/Things to keep in mind as we are doing this work

  • Adhere to Webpack’s idiomatic practices to maximize long-term benefits.
  • Maintain a focus on minimizing developer velocity impact. It is going to be slower as we add more code but make sure to evaluate all possibilities to make sure we are increasing as minimally as possible. Maybe there is a "ratio" metric we can use to make sure we maintain a velocity impact in line with code increase
  • Evaluate potential solutions for speculative preloading and hover-prefetching to optimize runtime performance.

Subissues

Work Breakdown

  • LavaMoat Integration:
    • Understand remaining blockers on Lavamoat / Endomoat and assist with removing
    • Ensure Webpack builds can run inside the LavaMoat binary (endomoat)
    • LavaMoat plugins
  • Service workers, used by MV3, must load dependencies via importScripts.
    • May be able to use a open source tool now. Need to investigate as part of the work
  • Webpack Zip issues
  • Address memory issues caused by large embedded assets.
  • Complete remaining cleanup of problematic SVG files.

Scenario

n/a

Design

n/a

Technical Details

n/a

Threat Modeling Framework

n/a

Acceptance Criteria

  • Successfully run Webpack build processes inside the LavaMoat binary. (Don't benchmark based on running inside the Lavamoat)
  • Ensure compatibility with both MV2 and MV3 builds.
  • Support all development environments (Windows, Mac, Linux).
  • Transition to a single, unified build system with no remaining dependencies on the old system.

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@gauthierpetetin gauthierpetetin added the team-extension-platform Extension Platform team label Jan 13, 2025
@gauthierpetetin gauthierpetetin changed the title EPIC: Webpack [EPIC] Webpack Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-extension-platform Extension Platform team
Projects
None yet
Development

No branches or pull requests

2 participants