Skip to content

chore(deps): Inline normalize-path - #2557

Merged
aklinker1 merged 7 commits into
mainfrom
inline-support
Aug 1, 2026
Merged

aklinker1 merged 7 commits into
mainfrom
inline-support

Conversation

@aklinker1

@aklinker1 aklinker1 commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Overview

Prebuild inline deps as minified ESM, then change where the WXT build resolves these depedencies from - from node_modules to the new inline directory.

Goal here is to strip unused CJS, docs, maps, and other files that are not necessary for WXT to function. Generally dependencies should only be inlined if they are small themselves, and this will just prevent package managers from having to resolve and download these packages.

A couple of potential issues with this:

  • CJS/ESM interop - does rolldown output a ESM file in the same export format as we consume in the source code? Will consumers be able to import these files? Seems like it if the template tests are passing
  • Tree-shaking - currently, we're pre-bundling the entire inline dep - but what if we only use one of the exports? Does the WXT build tree-shake out unused code automatically? If not, our install footprint will still be smaller, but not as small as it could be.
  • Inlining dependencies with dependencies - this should work just fine.

Results from inlining normalize-path: 18MB / 125 packages → 18MB / 124 packages

WXT itself goes from 335KB → 336KB (+0.79 kB vs -9.2 kB from removing the package)

Manual Testing

If the template jobs pass CI, that means the setup is working, and projects using WXT can import things correctly.

Related Issue

Apart of #2523

@netlify

netlify Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 0a408ed
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a6e7121bcc37a00084c1729
😎 Deploy Preview https://deploy-preview-2557--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Aug 1, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2557

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2557

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2557

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2557

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2557

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2557

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2557

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2557

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2557

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2557

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2557

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2557

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2557

wxt

npm i https://pkg.pr.new/wxt@2557

commit: 0a408ed

@codecov

codecov Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.24%. Comparing base (9afcad1) to head (0a408ed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2557      +/-   ##
==========================================
- Coverage   79.28%   79.24%   -0.05%     
==========================================
  Files         134      134              
  Lines        3997     3994       -3     
  Branches      924      921       -3     
==========================================
- Hits         3169     3165       -4     
  Misses        733      733              
- Partials       95       96       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aklinker1
aklinker1 marked this pull request as ready for review August 1, 2026 22:11
@aklinker1 aklinker1 changed the title chore: Modify build to support inlining some dependencies chore(deps): Inline normalize-path Aug 1, 2026
Co-authored-by: Suvesh Moza <[email protected]>
@aklinker1

Copy link
Copy Markdown
Member Author

Tested in one of my extensions for real, works just fine.

@aklinker1
aklinker1 merged commit d300924 into main Aug 1, 2026
24 checks passed
@aklinker1
aklinker1 deleted the inline-support branch August 1, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant