wxt
wxt copied to clipboard
fix(manifest): keep `content_script` `matches` unsorted
Overview
I’ve noticed that URL patterns in matches end up being sorted. This affects what extension users see in the store, so sorting may be therefore undesired. For example, if we have
www.example.com
m.example.com
another-less-important-example.com
, users will end up being presented with
another-less-important-example.com
m.example.com
www.example.com
That's somewhat less logical than the original sequence.
Manual Testing
I tested the changes locally via pnpm patch.
Related Issue
I haven’t found or created one. The change is quite small so felt worth a PR right away. If you disagree with the idea, feel free to ignore this change. pnpm patch gives a good enough workaround, so the issue is not blocking.
PS: Pretty impressed with wxt, great project!
Deploy Preview for creative-fairy-df92c4 ready!
| Name | Link |
|---|---|
| Latest commit | 8123e6ab296dea815640c72369454d202767639b |
| Latest deploy log | https://app.netlify.com/projects/creative-fairy-df92c4/deploys/68fa0b10c494400008988d80 |
| Deploy Preview | https://deploy-preview-1806--creative-fairy-df92c4.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
@wxt-dev/analytics
npm i https://pkg.pr.new/@wxt-dev/analytics@1806
@wxt-dev/auto-icons
npm i https://pkg.pr.new/@wxt-dev/auto-icons@1806
@wxt-dev/browser
npm i https://pkg.pr.new/@wxt-dev/browser@1806
@wxt-dev/i18n
npm i https://pkg.pr.new/@wxt-dev/i18n@1806
@wxt-dev/module-react
npm i https://pkg.pr.new/@wxt-dev/module-react@1806
@wxt-dev/module-solid
npm i https://pkg.pr.new/@wxt-dev/module-solid@1806
@wxt-dev/module-svelte
npm i https://pkg.pr.new/@wxt-dev/module-svelte@1806
@wxt-dev/module-vue
npm i https://pkg.pr.new/@wxt-dev/module-vue@1806
@wxt-dev/runner
npm i https://pkg.pr.new/@wxt-dev/runner@1806
@wxt-dev/storage
npm i https://pkg.pr.new/@wxt-dev/storage@1806
@wxt-dev/unocss
npm i https://pkg.pr.new/@wxt-dev/unocss@1806
@wxt-dev/webextension-polyfill
npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@1806
wxt
npm i https://pkg.pr.new/wxt@1806
commit: b0f2640
I'm good with this change as long it doesn't cause tests to become flakey in this repo (the only reason I sort everything lol, things start failing real fast if you don't ensure an order).
Patching works, but if you don't want to deal with conflicts with the patch when upgrading WXT, you could use the build:manifestGenerated hook in your config or a WXT module to update the manifest how you want: https://wxt.dev/guide/essentials/config/hooks.html
Happy to make additional changes if needed. What would you suggest?