wxt 0.13.3 → 0.13.5

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.
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.13.3";
2
+ var version = "0.13.5";
3
3
 
4
4
  // src/core/utils/arrays.ts
5
5
  function every(array, predicate) {
@@ -1009,6 +1009,9 @@ async function craeteViteBuilder(inlineConfig, userConfig, wxtConfig) {
1009
1009
  config.build ??= {};
1010
1010
  config.build.outDir = wxtConfig.outDir;
1011
1011
  config.build.emptyOutDir = false;
1012
+ if (config.build.minify == null && wxtConfig.command === "serve") {
1013
+ config.build.minify = false;
1014
+ }
1012
1015
  config.plugins ??= [];
1013
1016
  config.plugins.push(
1014
1017
  download(wxtConfig),
@@ -1760,7 +1763,7 @@ async function generateManifest(entrypoints, buildOutput, config) {
1760
1763
  'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/manifest.html#version-and-version-name'
1761
1764
  );
1762
1765
  }
1763
- let version2 = config.manifest.version ?? simplifyVersion(versionName);
1766
+ const version2 = config.manifest.version ?? simplifyVersion(versionName);
1764
1767
  const baseManifest = {
1765
1768
  manifest_version: config.manifestVersion,
1766
1769
  name: pkg?.name,
@@ -2105,7 +2108,10 @@ function getContentScriptCssWebAccessibleResources(config, contentScripts, conte
2105
2108
  } else {
2106
2109
  resources.push({
2107
2110
  resources: [cssFile],
2108
- matches: script.options.matches
2111
+ matches: resolvePerBrowserOption(
2112
+ script.options.matches,
2113
+ config.browser
2114
+ ).map((matchPattern) => stripPathFromMatchPattern(matchPattern))
2109
2115
  });
2110
2116
  }
2111
2117
  });
@@ -2135,6 +2141,13 @@ function addHostPermission(manifest, hostPermission) {
2135
2141
  return;
2136
2142
  manifest.host_permissions.push(hostPermission);
2137
2143
  }
2144
+ function stripPathFromMatchPattern(pattern) {
2145
+ const protocolSepIndex = pattern.indexOf("://");
2146
+ if (protocolSepIndex === -1)
2147
+ return pattern;
2148
+ const startOfPath = pattern.indexOf("/", protocolSepIndex + 3);
2149
+ return pattern.substring(0, startOfPath) + "/*";
2150
+ }
2138
2151
 
2139
2152
  // src/core/utils/building/rebuild.ts
2140
2153
  async function rebuild(config, entrypointGroups, existingOutput = {
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import "./chunk-VBXJIVYU.js";
4
4
  import cac from "cac";
5
5
 
6
6
  // package.json
7
- var version = "0.13.3";
7
+ var version = "0.13.5";
8
8
 
9
9
  // src/core/utils/fs.ts
10
10
  import fs from "fs-extra";
@@ -1302,6 +1302,9 @@ async function craeteViteBuilder(inlineConfig, userConfig, wxtConfig) {
1302
1302
  config.build ??= {};
1303
1303
  config.build.outDir = wxtConfig.outDir;
1304
1304
  config.build.emptyOutDir = false;
1305
+ if (config.build.minify == null && wxtConfig.command === "serve") {
1306
+ config.build.minify = false;
1307
+ }
1305
1308
  config.plugins ??= [];
1306
1309
  config.plugins.push(
1307
1310
  download(wxtConfig),
@@ -2057,7 +2060,7 @@ async function generateManifest(entrypoints, buildOutput, config) {
2057
2060
  'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/manifest.html#version-and-version-name'
2058
2061
  );
2059
2062
  }
2060
- let version2 = config.manifest.version ?? simplifyVersion(versionName);
2063
+ const version2 = config.manifest.version ?? simplifyVersion(versionName);
2061
2064
  const baseManifest = {
2062
2065
  manifest_version: config.manifestVersion,
2063
2066
  name: pkg?.name,
@@ -2402,7 +2405,10 @@ function getContentScriptCssWebAccessibleResources(config, contentScripts, conte
2402
2405
  } else {
2403
2406
  resources.push({
2404
2407
  resources: [cssFile],
2405
- matches: script.options.matches
2408
+ matches: resolvePerBrowserOption(
2409
+ script.options.matches,
2410
+ config.browser
2411
+ ).map((matchPattern) => stripPathFromMatchPattern(matchPattern))
2406
2412
  });
2407
2413
  }
2408
2414
  });
@@ -2432,6 +2438,13 @@ function addHostPermission(manifest, hostPermission) {
2432
2438
  return;
2433
2439
  manifest.host_permissions.push(hostPermission);
2434
2440
  }
2441
+ function stripPathFromMatchPattern(pattern) {
2442
+ const protocolSepIndex = pattern.indexOf("://");
2443
+ if (protocolSepIndex === -1)
2444
+ return pattern;
2445
+ const startOfPath = pattern.indexOf("/", protocolSepIndex + 3);
2446
+ return pattern.substring(0, startOfPath) + "/*";
2447
+ }
2435
2448
 
2436
2449
  // src/core/utils/building/rebuild.ts
2437
2450
  async function rebuild(config, entrypointGroups, existingOutput = {
package/dist/index.cjs CHANGED
@@ -3726,6 +3726,9 @@ async function craeteViteBuilder(inlineConfig, userConfig, wxtConfig) {
3726
3726
  config.build ??= {};
3727
3727
  config.build.outDir = wxtConfig.outDir;
3728
3728
  config.build.emptyOutDir = false;
3729
+ if (config.build.minify == null && wxtConfig.command === "serve") {
3730
+ config.build.minify = false;
3731
+ }
3729
3732
  config.plugins ??= [];
3730
3733
  config.plugins.push(
3731
3734
  download(wxtConfig),
@@ -4334,7 +4337,7 @@ function getChunkSortWeight(filename) {
4334
4337
  var import_picocolors3 = __toESM(require("picocolors"), 1);
4335
4338
 
4336
4339
  // package.json
4337
- var version = "0.13.3";
4340
+ var version = "0.13.5";
4338
4341
 
4339
4342
  // src/core/utils/log/printHeader.ts
4340
4343
  var import_consola2 = require("consola");
@@ -4483,7 +4486,7 @@ async function generateManifest(entrypoints, buildOutput, config) {
4483
4486
  'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/manifest.html#version-and-version-name'
4484
4487
  );
4485
4488
  }
4486
- let version2 = config.manifest.version ?? simplifyVersion(versionName);
4489
+ const version2 = config.manifest.version ?? simplifyVersion(versionName);
4487
4490
  const baseManifest = {
4488
4491
  manifest_version: config.manifestVersion,
4489
4492
  name: pkg?.name,
@@ -4828,7 +4831,10 @@ function getContentScriptCssWebAccessibleResources(config, contentScripts, conte
4828
4831
  } else {
4829
4832
  resources.push({
4830
4833
  resources: [cssFile],
4831
- matches: script.options.matches
4834
+ matches: resolvePerBrowserOption(
4835
+ script.options.matches,
4836
+ config.browser
4837
+ ).map((matchPattern) => stripPathFromMatchPattern(matchPattern))
4832
4838
  });
4833
4839
  }
4834
4840
  });
@@ -4858,6 +4864,13 @@ function addHostPermission(manifest, hostPermission) {
4858
4864
  return;
4859
4865
  manifest.host_permissions.push(hostPermission);
4860
4866
  }
4867
+ function stripPathFromMatchPattern(pattern) {
4868
+ const protocolSepIndex = pattern.indexOf("://");
4869
+ if (protocolSepIndex === -1)
4870
+ return pattern;
4871
+ const startOfPath = pattern.indexOf("/", protocolSepIndex + 3);
4872
+ return pattern.substring(0, startOfPath) + "/*";
4873
+ }
4861
4874
 
4862
4875
  // src/core/utils/building/rebuild.ts
4863
4876
  async function rebuild(config, entrypointGroups, existingOutput = {
package/dist/index.d.cts CHANGED
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
62
62
  */
63
63
  declare function zip(config?: InlineConfig): Promise<string[]>;
64
64
 
65
- var version = "0.13.3";
65
+ var version = "0.13.5";
66
66
 
67
67
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.d.ts CHANGED
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
62
62
  */
63
63
  declare function zip(config?: InlineConfig): Promise<string[]>;
64
64
 
65
- var version = "0.13.3";
65
+ var version = "0.13.5";
66
66
 
67
67
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  rebuild,
16
16
  resolvePerBrowserOption,
17
17
  version
18
- } from "./chunk-EWVNLDDM.js";
18
+ } from "./chunk-4XQPQZIP.js";
19
19
  import "./chunk-VBXJIVYU.js";
20
20
 
21
21
  // src/core/build.ts
package/dist/testing.cjs CHANGED
@@ -734,6 +734,9 @@ async function craeteViteBuilder(inlineConfig, userConfig, wxtConfig) {
734
734
  config.build ??= {};
735
735
  config.build.outDir = wxtConfig.outDir;
736
736
  config.build.emptyOutDir = false;
737
+ if (config.build.minify == null && wxtConfig.command === "serve") {
738
+ config.build.minify = false;
739
+ }
737
740
  config.plugins ??= [];
738
741
  config.plugins.push(
739
742
  download(wxtConfig),
package/dist/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  tsconfigPaths,
6
6
  unimport,
7
7
  webextensionPolyfillMock
8
- } from "./chunk-EWVNLDDM.js";
8
+ } from "./chunk-4XQPQZIP.js";
9
9
  import "./chunk-VBXJIVYU.js";
10
10
 
11
11
  // src/testing/fake-browser.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.13.3",
4
+ "version": "0.13.5",
5
5
  "description": "Next gen framework for developing web extensions",
6
6
  "engines": {
7
7
  "node": ">=18",