wxt 0.16.1 → 0.16.2
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/dist/{chunk-7RB7TV6M.js → chunk-427XEK7Z.js} +18 -2
- package/dist/cli.js +18 -2
- package/dist/index.cjs +18 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.cjs +17 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.16.
|
|
2
|
+
var version = "0.16.2";
|
|
3
3
|
|
|
4
4
|
// src/core/utils/arrays.ts
|
|
5
5
|
function every(array, predicate) {
|
|
@@ -1048,6 +1048,21 @@ function entrypointGroupGlobals(entrypointGroup) {
|
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
+
// src/core/builders/vite/plugins/defineImportMeta.ts
|
|
1052
|
+
function defineImportMeta() {
|
|
1053
|
+
return {
|
|
1054
|
+
name: "wxt:define",
|
|
1055
|
+
config() {
|
|
1056
|
+
return {
|
|
1057
|
+
define: {
|
|
1058
|
+
// This works for all extension contexts, including background service worker
|
|
1059
|
+
"import.meta.url": "self.location.href"
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1051
1066
|
// src/core/builders/vite/index.ts
|
|
1052
1067
|
async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
1053
1068
|
const vite = await import("vite");
|
|
@@ -1084,7 +1099,8 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
1084
1099
|
tsconfigPaths(wxtConfig),
|
|
1085
1100
|
noopBackground(),
|
|
1086
1101
|
globals(wxtConfig),
|
|
1087
|
-
excludeBrowserPolyfill(wxtConfig)
|
|
1102
|
+
excludeBrowserPolyfill(wxtConfig),
|
|
1103
|
+
defineImportMeta()
|
|
1088
1104
|
);
|
|
1089
1105
|
if (wxtConfig.analysis.enabled) {
|
|
1090
1106
|
config.plugins.push(bundleAnalysis());
|
package/dist/cli.js
CHANGED
|
@@ -1365,6 +1365,21 @@ function entrypointGroupGlobals(entrypointGroup) {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
|
+
// src/core/builders/vite/plugins/defineImportMeta.ts
|
|
1369
|
+
function defineImportMeta() {
|
|
1370
|
+
return {
|
|
1371
|
+
name: "wxt:define",
|
|
1372
|
+
config() {
|
|
1373
|
+
return {
|
|
1374
|
+
define: {
|
|
1375
|
+
// This works for all extension contexts, including background service worker
|
|
1376
|
+
"import.meta.url": "self.location.href"
|
|
1377
|
+
}
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1368
1383
|
// src/core/builders/vite/index.ts
|
|
1369
1384
|
async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
1370
1385
|
const vite = await import("vite");
|
|
@@ -1401,7 +1416,8 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
1401
1416
|
tsconfigPaths(wxtConfig),
|
|
1402
1417
|
noopBackground(),
|
|
1403
1418
|
globals(wxtConfig),
|
|
1404
|
-
excludeBrowserPolyfill(wxtConfig)
|
|
1419
|
+
excludeBrowserPolyfill(wxtConfig),
|
|
1420
|
+
defineImportMeta()
|
|
1405
1421
|
);
|
|
1406
1422
|
if (wxtConfig.analysis.enabled) {
|
|
1407
1423
|
config.plugins.push(bundleAnalysis());
|
|
@@ -2027,7 +2043,7 @@ function getChunkSortWeight(filename) {
|
|
|
2027
2043
|
import pc4 from "picocolors";
|
|
2028
2044
|
|
|
2029
2045
|
// package.json
|
|
2030
|
-
var version = "0.16.
|
|
2046
|
+
var version = "0.16.2";
|
|
2031
2047
|
|
|
2032
2048
|
// src/core/utils/log/printHeader.ts
|
|
2033
2049
|
import { consola as consola2 } from "consola";
|
package/dist/index.cjs
CHANGED
|
@@ -3791,6 +3791,21 @@ function entrypointGroupGlobals(entrypointGroup) {
|
|
|
3791
3791
|
};
|
|
3792
3792
|
}
|
|
3793
3793
|
|
|
3794
|
+
// src/core/builders/vite/plugins/defineImportMeta.ts
|
|
3795
|
+
function defineImportMeta() {
|
|
3796
|
+
return {
|
|
3797
|
+
name: "wxt:define",
|
|
3798
|
+
config() {
|
|
3799
|
+
return {
|
|
3800
|
+
define: {
|
|
3801
|
+
// This works for all extension contexts, including background service worker
|
|
3802
|
+
"import.meta.url": "self.location.href"
|
|
3803
|
+
}
|
|
3804
|
+
};
|
|
3805
|
+
}
|
|
3806
|
+
};
|
|
3807
|
+
}
|
|
3808
|
+
|
|
3794
3809
|
// src/core/builders/vite/index.ts
|
|
3795
3810
|
async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
3796
3811
|
const vite = await import("vite");
|
|
@@ -3827,7 +3842,8 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
3827
3842
|
tsconfigPaths(wxtConfig),
|
|
3828
3843
|
noopBackground(),
|
|
3829
3844
|
globals(wxtConfig),
|
|
3830
|
-
excludeBrowserPolyfill(wxtConfig)
|
|
3845
|
+
excludeBrowserPolyfill(wxtConfig),
|
|
3846
|
+
defineImportMeta()
|
|
3831
3847
|
);
|
|
3832
3848
|
if (wxtConfig.analysis.enabled) {
|
|
3833
3849
|
config.plugins.push(bundleAnalysis());
|
|
@@ -4454,7 +4470,7 @@ function getChunkSortWeight(filename) {
|
|
|
4454
4470
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
4455
4471
|
|
|
4456
4472
|
// package.json
|
|
4457
|
-
var version = "0.16.
|
|
4473
|
+
var version = "0.16.2";
|
|
4458
4474
|
|
|
4459
4475
|
// src/core/utils/log/printHeader.ts
|
|
4460
4476
|
var import_consola2 = require("consola");
|
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.16.
|
|
65
|
+
var version = "0.16.2";
|
|
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.16.
|
|
65
|
+
var version = "0.16.2";
|
|
66
66
|
|
|
67
67
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
package/dist/testing.cjs
CHANGED
|
@@ -653,6 +653,21 @@ function entrypointGroupGlobals(entrypointGroup) {
|
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
+
// src/core/builders/vite/plugins/defineImportMeta.ts
|
|
657
|
+
function defineImportMeta() {
|
|
658
|
+
return {
|
|
659
|
+
name: "wxt:define",
|
|
660
|
+
config() {
|
|
661
|
+
return {
|
|
662
|
+
define: {
|
|
663
|
+
// This works for all extension contexts, including background service worker
|
|
664
|
+
"import.meta.url": "self.location.href"
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
|
|
656
671
|
// src/core/utils/fs.ts
|
|
657
672
|
var import_fs_extra3 = __toESM(require("fs-extra"), 1);
|
|
658
673
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
@@ -784,7 +799,8 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
784
799
|
tsconfigPaths(wxtConfig),
|
|
785
800
|
noopBackground(),
|
|
786
801
|
globals(wxtConfig),
|
|
787
|
-
excludeBrowserPolyfill(wxtConfig)
|
|
802
|
+
excludeBrowserPolyfill(wxtConfig),
|
|
803
|
+
defineImportMeta()
|
|
788
804
|
);
|
|
789
805
|
if (wxtConfig.analysis.enabled) {
|
|
790
806
|
config.plugins.push(bundleAnalysis());
|
package/dist/testing.js
CHANGED