Aaron
66bd957ee0
fix: Don't crash background service worker when using import.meta.url ( #402 )
2024-02-03 14:57:34 -06:00
Aaron
eca30296a7
feat!: ESM background support ( #398 )
...
BREAKING CHANGE: The build output has changed slightly. This isn't a huge deal, and no steps are required for users unless you're doing something weird with the output files after a build.
Before:
```
.output/
<target>/
chunks/
popup-<hash>.js
popup.html
```
After:
```
.output/
<target>/
popup.html
popup.js
```
This applies for all HTML files, not just the popup.
2024-02-02 10:17:43 -06:00
Aaron
2af8d28b82
fix(dev): Reload <name>/index.html entrypoints properly on save ( #390 )
2024-01-31 08:50:23 -06:00
Aaron
26e30aaae9
feat: Add submit command ( #370 )
2024-01-30 12:55:17 -06:00
Nenad Novaković
6557dfe430
fix(dev): Resolve script and link aliases ( #387 )
...
Co-authored-by: Aaron Klinker <aaronklinker1@gmail.com >
2024-01-30 12:05:31 -06:00
Aaron
dd7abddb7c
feat: Allow passing custom preferences to chrome, enabling dev mode on chrome://extensions and allowing content script sourcemaps automatically ( #384 )
2024-01-29 13:58:46 -06:00
Aaron
6f901b32eb
fix: Enable inline sourcemaps by default during development ( #382 )
2024-01-29 11:15:57 -06:00
Aaron
927aca612e
fix!: Move browser constants to import.meta.env ( #380 )
...
BREAKING CHANGE: Renamed undocumented constants:
- `__BROWSER__` → `import.meta.env.BROWSER`
- `__COMMAND__` → `import.meta.env.COMMAND`
- `__MANIFEST_VERSION__` → `import.meta.env.MANIFEST_VERSION`
- `__IS_CHROME__` → `import.meta.env.CHROME`
- `__IS_FIREFOX__` → `import.meta.env.FIREFOX`
- `__IS_SAFARI__` → `import.meta.env.SAFARI`
- `__IS_EDGE__` → `import.meta.env.EDGE`
- `__IS_OPERA__` → `import.meta.env.OPERA`
2024-01-29 11:14:18 -06:00
Nenad Novaković
2dcdae91eb
feat(zip)!: add includeSources and rename ignoredSources to excludeSources ( #378 )
...
Co-authored-by: Aaron <aaronklinker1@gmail.com >
BREAKING CHANGE: Renamed `ignoredSources` to `excludeSources`
2024-01-29 11:13:39 -06:00
Aaron
5acf51af9d
fix: Generate missing sourcemap in wxt:unimport plugin ( #381 )
2024-01-29 10:30:42 -06:00
Aaron Klinker
f9718a1b71
docs: Fix typo
2024-01-28 09:42:45 -06:00
Aaron Klinker
35865adcb2
fix(storage): Throw better error message when importing outside a extension environment
...
This closes #371
2024-01-27 00:26:35 -06:00
Aaron Klinker
3b63a51475
fix: Improve error messages when importing and building entrypoints
2024-01-27 00:20:48 -06:00
Aaron
87267347f3
feat: Add basic validation for entrypoint options ( #368 )
2024-01-24 00:31:05 -06:00
Aaron
326e84b667
feat: Restart dev mode when saving config ( #365 )
2024-01-19 22:58:49 -06:00
Aaron
9ace395e11
fix: Add subdependency bin directory so wxt build --analyze works with PNPM ( #363 )
2024-01-19 11:32:18 -06:00
Aaron
a525d786f1
feat: Add dev.reloadCommand config ( #362 )
2024-01-19 08:33:03 -06:00
Aaron
948ee810da
fix: Disable reload dev command when 4 commands are already registered ( #361 )
2024-01-19 07:47:04 -06:00
Aaron
148c0da51f
chore: Add unit tests for passing flags via the CLI ( #354 )
2024-01-18 14:49:35 -06:00
Yuns
54e24652da
fix: Make getArrayFromFlags result can be undefined ( #352 )
2024-01-16 23:15:18 -06:00
Yuns
460667e3c0
feat: Add filterEntrypoints option to speed up development ( #344 )
...
Co-authored-by: Aaron Klinker <aaronklinker1@gmail.com >
2024-01-16 13:52:58 -06:00
Aaron
971daf2784
fix: Allow browser.runtime.getURL to include hashes and query params for HTML paths ( #350 )
2024-01-16 12:59:38 -06:00
Aaron
89d8ef9a50
fix: Improve error message and document use of imported variables outside an entrypoint's main function ( #346 )
2024-01-14 09:36:22 -06:00
Aaron Klinker
a329e24818
chore: Fix typo in function name
2024-01-12 13:03:43 -06:00
Aaron
249cf63da8
perf: Only call findEntrypoint once per build ( #342 )
2024-01-12 13:02:44 -06:00
Aaron Klinker
b6ab7a9567
fix: Use Alt+R/Opt+R to reload extension during development
...
This closes #339
2024-01-12 08:47:21 -06:00
Aaron
5343430c0f
feat!: Refactor content script UI functions and add helper for "integrated" UIs ( #333 )
...
BREAKING CHANGES: Several APIs/options have been renamed:
- `type: "inline" | "overlay" | "modal"` has been changed to `position: "inline" | "overlay" | "modal"`
- `createContentScriptUi({ ... })` → `createShadowRootUi({ ... })`
- `createContentScriptIframe({ ... })` → `createIframeUi({ ... })`
- `onRemove` is now called ***before*** the UI is removed from the DOM, previously it was called after the UI was removed
2024-01-10 20:48:17 -06:00
Aaron
dca52864bb
fix: Strip path from web_accessible_resources[0].matches ( #332 )
2024-01-08 13:17:31 -06:00
Aaron Klinker
b7cdf1597c
fix: Disable minification during development
...
This closes #328
2024-01-07 10:48:25 -06:00
Aaron Klinker
2770974261
chore: Use const instead of let
2024-01-07 10:46:49 -06:00
Aaron
b0eb7da9b4
chore: Refactor manifest generation E2E tests to unit tests ( #323 )
2024-01-02 17:05:23 -06:00
Aaron
4f649fc872
feat(DX): Add ctrl+E/cmd+E shortcut to reload extension during development ( #322 )
2024-01-02 12:06:22 -06:00
冯不游
e347f4529f
feat: Add isolateEvents option to createContentScripUi ( #313 )
...
Co-authored-by: Aaron <aaronklinker1@gmail.com >
2024-01-01 10:01:33 -06:00
Aaron
ff6740d429
fix: Ship vite/client types internally for proper resolution using PNPM ( #304 )
2023-12-29 01:21:05 -06:00
Aaron
e6657cb533
fix(storage): Support multiple : characters in storage keys ( #303 )
2023-12-29 00:40:47 -06:00
Aaron
d1b9e5ded6
feat!: New wxt/storage APIs ( #300 )
...
BREAKING CHANGE: `wxt/storage` no longer relies on `unstorage`. Some `unstorage` APIs, like `prefixStorage`, have been removed, while others, like `snapshot`, are methods on the new `storage` object. Most of the standard usage remains the same.
2023-12-27 11:00:10 -06:00
Aaron
e1f181356c
fix: Correct import in dev-only, noop background ( #298 )
2023-12-24 08:24:53 -06:00
Aaron
b4a2cf4cb2
fix: Disable Vite CJS warnings ( #296 )
2023-12-23 09:35:43 -06:00
Aaron
ad0e8e4144
fix: Correctly mock webextension-polyfill for Vitest ( #294 )
2023-12-22 22:21:09 -06:00
Aaron
1a8b7ff635
feat: Support PNPM without hoisting dependencies ( #291 )
2023-12-19 11:42:20 -06:00
Aaron
0a88955394
fix: Throw error when no entrypoints are found ( #283 )
2023-12-13 15:50:28 -06:00
Aaron
6f902cc598
docs: Improve content script UI guide ( #272 )
2023-12-13 15:43:40 -06:00
Aaron
fde488ac82
feat!: Add support for "main world" content scripts ( #284 )
...
BREAKING CHANGE: `defineContentScript` and `defineBackground` are now exported from `wxt/sandbox` instead of `wxt/client`. If you use auto-imports, no changes are required. If you have disabled auto-imports, you'll need to manually update your import statements.
2023-12-13 15:41:39 -06:00
Aaron
0873c24ad8
chore: Convert WXT CLI to an ESM binary ( #279 )
2023-12-12 14:44:04 -06:00
Aaron
7c02497148
fix: Only use type imports for Vite ( #278 )
2023-12-12 14:24:42 -06:00
Aaron
f1cf866fe1
fix: Improve duplicate entrypoint name detection and catch the error before loading their config ( #276 )
2023-12-12 13:22:09 -06:00
Aaron
d92a126489
fix: Discover .js, .jsx, and .tsx unlisted scripts correctly ( #274 )
2023-12-12 12:24:38 -06:00
Aaron
21cf3642cb
docs: Improve content script UI docs ( #268 )
2023-12-09 23:36:35 -06:00
Aaron
8786aa91b3
feat: Add util for detecting URL changes in content scripts ( #264 )
2023-12-07 13:29:33 -06:00
Aaron
1a39a0d153
feat!: Vite 5 support ( #261 )
2023-12-06 11:18:52 -06:00