wxt 0.16.10 → 0.16.11
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-PIVW7CL3.js → chunk-YH7RSTGT.js} +14 -6
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +14 -7
- package/dist/index.cjs +14 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/testing.cjs +11 -4
- 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.11";
|
|
3
3
|
|
|
4
4
|
// src/core/utils/paths.ts
|
|
5
5
|
import systemPath from "node:path";
|
|
@@ -212,6 +212,9 @@ function resolvePerBrowserOptions(options, browser) {
|
|
|
212
212
|
])
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
|
+
function isHtmlEntrypoint(entrypoint) {
|
|
216
|
+
return entrypoint.inputPath.endsWith(".html");
|
|
217
|
+
}
|
|
215
218
|
|
|
216
219
|
// src/core/utils/constants.ts
|
|
217
220
|
var VIRTUAL_NOOP_BACKGROUND_MODULE_ID = "virtual:user-background";
|
|
@@ -724,7 +727,7 @@ async function writePathsDeclarationFile(entrypoints) {
|
|
|
724
727
|
(entry) => getEntrypointBundlePath(
|
|
725
728
|
entry,
|
|
726
729
|
wxt.config.outDir,
|
|
727
|
-
entry
|
|
730
|
+
isHtmlEntrypoint(entry) ? ".html" : ".js"
|
|
728
731
|
)
|
|
729
732
|
).concat(await getPublicFiles()).map(normalizePath).map((path7) => ` | "/${path7}"`).sort().join("\n");
|
|
730
733
|
const template = `// Generated by wxt
|
|
@@ -1520,6 +1523,9 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
1520
1523
|
return libMode;
|
|
1521
1524
|
};
|
|
1522
1525
|
const getMultiPageConfig = (entrypoints) => {
|
|
1526
|
+
const htmlEntrypoints = new Set(
|
|
1527
|
+
entrypoints.filter(isHtmlEntrypoint).map((e) => e.name)
|
|
1528
|
+
);
|
|
1523
1529
|
return {
|
|
1524
1530
|
mode: wxtConfig.mode,
|
|
1525
1531
|
plugins: [
|
|
@@ -1535,10 +1541,11 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
1535
1541
|
output: {
|
|
1536
1542
|
// Include a hash to prevent conflicts
|
|
1537
1543
|
chunkFileNames: "chunks/[name]-[hash].js",
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1544
|
+
entryFileNames: ({ name }) => {
|
|
1545
|
+
if (htmlEntrypoints.has(name))
|
|
1546
|
+
return "chunks/[name]-[hash].js";
|
|
1547
|
+
return "[name].js";
|
|
1548
|
+
},
|
|
1542
1549
|
// We can't control the "name", so we need a hash to prevent conflicts
|
|
1543
1550
|
assetFileNames: "assets/[name]-[hash].[ext]"
|
|
1544
1551
|
}
|
|
@@ -2976,6 +2983,7 @@ export {
|
|
|
2976
2983
|
registerWxt,
|
|
2977
2984
|
detectDevChanges,
|
|
2978
2985
|
getEntrypointBundlePath,
|
|
2986
|
+
isHtmlEntrypoint,
|
|
2979
2987
|
findEntrypoints,
|
|
2980
2988
|
generateTypesDir,
|
|
2981
2989
|
formatDuration,
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
CHANGED
|
@@ -237,6 +237,9 @@ function resolvePerBrowserOptions(options, browser) {
|
|
|
237
237
|
])
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
|
+
function isHtmlEntrypoint(entrypoint) {
|
|
241
|
+
return entrypoint.inputPath.endsWith(".html");
|
|
242
|
+
}
|
|
240
243
|
|
|
241
244
|
// src/core/utils/constants.ts
|
|
242
245
|
var VIRTUAL_NOOP_BACKGROUND_MODULE_ID = "virtual:user-background";
|
|
@@ -749,7 +752,7 @@ async function writePathsDeclarationFile(entrypoints) {
|
|
|
749
752
|
(entry) => getEntrypointBundlePath(
|
|
750
753
|
entry,
|
|
751
754
|
wxt.config.outDir,
|
|
752
|
-
entry
|
|
755
|
+
isHtmlEntrypoint(entry) ? ".html" : ".js"
|
|
753
756
|
)
|
|
754
757
|
).concat(await getPublicFiles()).map(normalizePath).map((path8) => ` | "/${path8}"`).sort().join("\n");
|
|
755
758
|
const template = `// Generated by wxt
|
|
@@ -1520,6 +1523,9 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
1520
1523
|
return libMode;
|
|
1521
1524
|
};
|
|
1522
1525
|
const getMultiPageConfig = (entrypoints) => {
|
|
1526
|
+
const htmlEntrypoints = new Set(
|
|
1527
|
+
entrypoints.filter(isHtmlEntrypoint).map((e) => e.name)
|
|
1528
|
+
);
|
|
1523
1529
|
return {
|
|
1524
1530
|
mode: wxtConfig.mode,
|
|
1525
1531
|
plugins: [
|
|
@@ -1535,10 +1541,11 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
1535
1541
|
output: {
|
|
1536
1542
|
// Include a hash to prevent conflicts
|
|
1537
1543
|
chunkFileNames: "chunks/[name]-[hash].js",
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1544
|
+
entryFileNames: ({ name }) => {
|
|
1545
|
+
if (htmlEntrypoints.has(name))
|
|
1546
|
+
return "chunks/[name]-[hash].js";
|
|
1547
|
+
return "[name].js";
|
|
1548
|
+
},
|
|
1542
1549
|
// We can't control the "name", so we need a hash to prevent conflicts
|
|
1543
1550
|
assetFileNames: "assets/[name]-[hash].[ext]"
|
|
1544
1551
|
}
|
|
@@ -2174,7 +2181,7 @@ function getChunkSortWeight(filename) {
|
|
|
2174
2181
|
import pc4 from "picocolors";
|
|
2175
2182
|
|
|
2176
2183
|
// package.json
|
|
2177
|
-
var version = "0.16.
|
|
2184
|
+
var version = "0.16.11";
|
|
2178
2185
|
|
|
2179
2186
|
// src/core/utils/log/printHeader.ts
|
|
2180
2187
|
import { consola as consola2 } from "consola";
|
|
@@ -3308,7 +3315,7 @@ function reloadContentScripts(steps, server) {
|
|
|
3308
3315
|
}
|
|
3309
3316
|
}
|
|
3310
3317
|
function reloadHtmlPages(groups, server) {
|
|
3311
|
-
const htmlEntries = groups.flat().filter(
|
|
3318
|
+
const htmlEntries = groups.flat().filter(isHtmlEntrypoint);
|
|
3312
3319
|
htmlEntries.forEach((entry) => {
|
|
3313
3320
|
const path8 = getEntrypointBundlePath(entry, wxt.config.outDir, ".html");
|
|
3314
3321
|
server.reloadPage(path8);
|
package/dist/index.cjs
CHANGED
|
@@ -2660,6 +2660,9 @@ function resolvePerBrowserOptions(options, browser) {
|
|
|
2660
2660
|
])
|
|
2661
2661
|
);
|
|
2662
2662
|
}
|
|
2663
|
+
function isHtmlEntrypoint(entrypoint) {
|
|
2664
|
+
return entrypoint.inputPath.endsWith(".html");
|
|
2665
|
+
}
|
|
2663
2666
|
|
|
2664
2667
|
// src/core/utils/constants.ts
|
|
2665
2668
|
var VIRTUAL_NOOP_BACKGROUND_MODULE_ID = "virtual:user-background";
|
|
@@ -3172,7 +3175,7 @@ async function writePathsDeclarationFile(entrypoints) {
|
|
|
3172
3175
|
(entry) => getEntrypointBundlePath(
|
|
3173
3176
|
entry,
|
|
3174
3177
|
wxt.config.outDir,
|
|
3175
|
-
entry
|
|
3178
|
+
isHtmlEntrypoint(entry) ? ".html" : ".js"
|
|
3176
3179
|
)
|
|
3177
3180
|
).concat(await getPublicFiles()).map(normalizePath).map((path11) => ` | "/${path11}"`).sort().join("\n");
|
|
3178
3181
|
const template = `// Generated by wxt
|
|
@@ -3946,6 +3949,9 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
3946
3949
|
return libMode;
|
|
3947
3950
|
};
|
|
3948
3951
|
const getMultiPageConfig = (entrypoints) => {
|
|
3952
|
+
const htmlEntrypoints = new Set(
|
|
3953
|
+
entrypoints.filter(isHtmlEntrypoint).map((e) => e.name)
|
|
3954
|
+
);
|
|
3949
3955
|
return {
|
|
3950
3956
|
mode: wxtConfig.mode,
|
|
3951
3957
|
plugins: [
|
|
@@ -3961,10 +3967,11 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
3961
3967
|
output: {
|
|
3962
3968
|
// Include a hash to prevent conflicts
|
|
3963
3969
|
chunkFileNames: "chunks/[name]-[hash].js",
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3970
|
+
entryFileNames: ({ name }) => {
|
|
3971
|
+
if (htmlEntrypoints.has(name))
|
|
3972
|
+
return "chunks/[name]-[hash].js";
|
|
3973
|
+
return "[name].js";
|
|
3974
|
+
},
|
|
3968
3975
|
// We can't control the "name", so we need a hash to prevent conflicts
|
|
3969
3976
|
assetFileNames: "assets/[name]-[hash].[ext]"
|
|
3970
3977
|
}
|
|
@@ -4601,7 +4608,7 @@ function getChunkSortWeight(filename) {
|
|
|
4601
4608
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
4602
4609
|
|
|
4603
4610
|
// package.json
|
|
4604
|
-
var version = "0.16.
|
|
4611
|
+
var version = "0.16.11";
|
|
4605
4612
|
|
|
4606
4613
|
// src/core/utils/log/printHeader.ts
|
|
4607
4614
|
var import_consola2 = require("consola");
|
|
@@ -5741,7 +5748,7 @@ function reloadContentScripts(steps, server) {
|
|
|
5741
5748
|
}
|
|
5742
5749
|
}
|
|
5743
5750
|
function reloadHtmlPages(groups, server) {
|
|
5744
|
-
const htmlEntries = groups.flat().filter(
|
|
5751
|
+
const htmlEntries = groups.flat().filter(isHtmlEntrypoint);
|
|
5745
5752
|
htmlEntries.forEach((entry) => {
|
|
5746
5753
|
const path11 = getEntrypointBundlePath(entry, wxt.config.outDir, ".html");
|
|
5747
5754
|
server.reloadPage(path11);
|
package/dist/index.d.cts
CHANGED
|
@@ -64,6 +64,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
64
64
|
*/
|
|
65
65
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
66
66
|
|
|
67
|
-
var version = "0.16.
|
|
67
|
+
var version = "0.16.11";
|
|
68
68
|
|
|
69
69
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
64
64
|
*/
|
|
65
65
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
66
66
|
|
|
67
|
-
var version = "0.16.
|
|
67
|
+
var version = "0.16.11";
|
|
68
68
|
|
|
69
69
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
getEntrypointBundlePath,
|
|
9
9
|
getPackageJson,
|
|
10
10
|
internalBuild,
|
|
11
|
+
isHtmlEntrypoint,
|
|
11
12
|
kebabCaseAlphanumeric,
|
|
12
13
|
mapWxtOptionsToRegisteredContentScript,
|
|
13
14
|
printFileList,
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
unnormalizePath,
|
|
17
18
|
version,
|
|
18
19
|
wxt
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YH7RSTGT.js";
|
|
20
21
|
import "./chunk-VBXJIVYU.js";
|
|
21
22
|
|
|
22
23
|
// src/core/build.ts
|
|
@@ -378,7 +379,7 @@ function reloadContentScripts(steps, server) {
|
|
|
378
379
|
}
|
|
379
380
|
}
|
|
380
381
|
function reloadHtmlPages(groups, server) {
|
|
381
|
-
const htmlEntries = groups.flat().filter(
|
|
382
|
+
const htmlEntries = groups.flat().filter(isHtmlEntrypoint);
|
|
382
383
|
htmlEntries.forEach((entry) => {
|
|
383
384
|
const path3 = getEntrypointBundlePath(entry, wxt.config.outDir, ".html");
|
|
384
385
|
server.reloadPage(path3);
|
package/dist/testing.cjs
CHANGED
|
@@ -64,6 +64,9 @@ function getEntrypointBundlePath(entrypoint, outDir, ext) {
|
|
|
64
64
|
(0, import_node_path2.relative)(outDir, getEntrypointOutputFile(entrypoint, ext))
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
+
function isHtmlEntrypoint(entrypoint) {
|
|
68
|
+
return entrypoint.inputPath.endsWith(".html");
|
|
69
|
+
}
|
|
67
70
|
|
|
68
71
|
// src/core/builders/vite/plugins/devHtmlPrerender.ts
|
|
69
72
|
var import_linkedom = require("linkedom");
|
|
@@ -837,6 +840,9 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
837
840
|
return libMode;
|
|
838
841
|
};
|
|
839
842
|
const getMultiPageConfig = (entrypoints) => {
|
|
843
|
+
const htmlEntrypoints = new Set(
|
|
844
|
+
entrypoints.filter(isHtmlEntrypoint).map((e) => e.name)
|
|
845
|
+
);
|
|
840
846
|
return {
|
|
841
847
|
mode: wxtConfig.mode,
|
|
842
848
|
plugins: [
|
|
@@ -852,10 +858,11 @@ async function createViteBuilder(inlineConfig, userConfig, wxtConfig) {
|
|
|
852
858
|
output: {
|
|
853
859
|
// Include a hash to prevent conflicts
|
|
854
860
|
chunkFileNames: "chunks/[name]-[hash].js",
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
861
|
+
entryFileNames: ({ name }) => {
|
|
862
|
+
if (htmlEntrypoints.has(name))
|
|
863
|
+
return "chunks/[name]-[hash].js";
|
|
864
|
+
return "[name].js";
|
|
865
|
+
},
|
|
859
866
|
// We can't control the "name", so we need a hash to prevent conflicts
|
|
860
867
|
assetFileNames: "assets/[name]-[hash].[ext]"
|
|
861
868
|
}
|
package/dist/testing.js
CHANGED