extension-develop 4.0.30 → 4.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/0~rspack-config.mjs +412 -117
- package/dist/0~stats-handler.mjs +26 -2
- package/dist/0~zip.mjs +22 -3
- package/dist/101.mjs +189 -126
- package/dist/349.mjs +5 -1
- package/dist/839.mjs +28 -21
- package/dist/contract/codes.json +1 -1
- package/dist/lib/stats-handler.d.ts +1 -0
- package/dist/plugin-compilation/env.d.ts +6 -0
- package/dist/plugin-perf-budgets/categorize.d.ts +1 -1
- package/dist/plugin-perf-budgets/index.d.ts +1 -0
- package/dist/plugin-wasm/index.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/legacy-paths.d.ts +26 -0
- package/dist/plugin-web-extension/feature-manifest/messages.d.ts +1 -1
- package/dist/plugin-web-extension/feature-manifest/steps/legacy-warnings.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/steps/update-manifest.d.ts +1 -0
- package/dist/plugin-web-extension/feature-web-resources/collect-entry-imports.d.ts +2 -0
- package/dist/plugin-web-extension/shared/discover-devtools-panels.d.ts +8 -0
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -172,7 +172,7 @@ Options accepted by each command. Values shown are typical types or enumerations
|
|
|
172
172
|
- Supported sections:
|
|
173
173
|
- config(config: Configuration): mutate the assembled Rspack config. Supports a function or a plain object. When an object is provided, it is deep‑merged on top of the assembled config.
|
|
174
174
|
- commands.dev | .build | .start | .preview: per‑command options (browser, profile, binaries, flags, preferences, unified logger defaults, packaging). These defaults are applied for all respective commands.
|
|
175
|
-
- browser.chrome | .firefox | .edge | .chromium-based | .gecko-based: start flags, excluded flags, preferences, binaries, profile reuse (persistProfile), and per-browser `extensions`.
|
|
175
|
+
- browser.chrome | .firefox | .edge | .safari | .chromium-based | .gecko-based | .webkit-based: start flags, excluded flags, preferences, binaries, profile reuse (persistProfile), and per-browser `extensions`.
|
|
176
176
|
- extensions: load-only companion extensions (unpacked dirs) loaded alongside your extension in dev/preview/start.
|
|
177
177
|
- Example: { dir: "./extensions" } loads every "./extensions/\*" folder that contains a manifest.json.
|
|
178
178
|
- Precedence when composing options (one contract for every command): stock defaults → browser._ → commands._ → CLI flags.
|
|
@@ -180,11 +180,11 @@ Options accepted by each command. Values shown are typical types or enumerations
|
|
|
180
180
|
- Example: `commands.dev.polyfill: false` turns the polyfill off for the team, and `--polyfill` turns it back on for one run.
|
|
181
181
|
- Lists (`browserFlags`, `excludeBrowserFlags`): concatenate across layers in order (browser, then command, then CLI) and dedupe.
|
|
182
182
|
- Objects (`preferences`): deep-merge, later layers win on key conflict.
|
|
183
|
-
- Browser key aliases when resolving `browser.*` from `extension.config
|
|
184
|
-
- When the runtime asks for `chromium`, `loadBrowserConfig` prefers `browser.chromium` and then falls back to `browser['chromium-based']`.
|
|
183
|
+
- Browser key aliases when resolving `browser.*` from `extension.config.*` (engine families adopt product blocks; named products do not adopt engine-based blocks):
|
|
185
184
|
- When the runtime asks for `chromium-based`, it prefers `browser['chromium-based']` and then `browser.chromium`.
|
|
186
|
-
- When the runtime asks for `firefox`, it prefers `browser.firefox` and then `browser['gecko-based']`.
|
|
187
185
|
- When the runtime asks for `gecko-based`, it prefers `browser['gecko-based']` and then `browser.firefox`.
|
|
186
|
+
- When the runtime asks for `webkit-based` **or any webkit-flavored fork name** (e.g. `acme-webkit`), it prefers the exact `browser.<name>` block, then `browser['webkit-based']`, then `browser.safari`.
|
|
187
|
+
- Named product `safari` only uses `browser.safari` (does not adopt `webkit-based`).
|
|
188
188
|
- When detected, a one‑time notice is printed to indicate config is active.
|
|
189
189
|
|
|
190
190
|
### Companion extensions (load-only)
|
|
@@ -300,7 +300,7 @@ dist/
|
|
|
300
300
|
| plugin-css | core | - Auto‑wires CSS for HTML and content scripts<br/>- Optional SASS/LESS/PostCSS when configs exist<br/>- Integrates Stylelint when configured |
|
|
301
301
|
| plugin-js-frameworks | core | - Detects React/Preact/Vue/Svelte and TypeScript<br/>- Configures SWC parsing, loaders/plugins, and safe aliases<br/>- Sets `tsconfig` resolution<br/>- Defers heavy work to `beforeRun` in production |
|
|
302
302
|
| plugin-static-assets | core | - Emits images, fonts, and misc files to `assets/`<br/>- Inlines small SVGs (≤2KB), emits larger ones<br/>- Content hashing in production; stable names in development<br/>- Respects existing custom SVG rules |
|
|
303
|
-
| plugin-compatibility | core | - Cross‑browser helpers<br/>- Normalizes browser‑specific manifest fields<br/>- Optional `webextension-polyfill` for Chromium
|
|
303
|
+
| plugin-compatibility | core | - Cross‑browser helpers<br/>- Normalizes browser‑specific manifest fields<br/>- Optional `webextension-polyfill` for Chromium (skipped for Firefox/Safari) |
|
|
304
304
|
| plugin-compilation | core | - Loads env and templating (`EXTENSION_PUBLIC_*`)<br/>- Optional `dist/<browser>` cleaning<br/>- Compact, de‑duplicated compilation summary |
|
|
305
305
|
|
|
306
306
|
## Notes and compatibility
|