wxt 0.16.5 → 0.16.6
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-N5MSLHHE.js → chunk-7UFBHZ5F.js} +20 -9
- package/dist/cli.js +20 -9
- package/dist/client.js +3 -7
- package/dist/{index-znx-ff-l.d.cts → index-avHSnR0o.d.cts} +21 -1
- package/dist/{index-znx-ff-l.d.ts → index-avHSnR0o.d.ts} +21 -1
- package/dist/index.cjs +20 -9
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/testing.cjs +14 -5
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/cli.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.16.
|
|
2
|
+
var version = "0.16.6";
|
|
3
3
|
|
|
4
4
|
// src/core/utils/fs.ts
|
|
5
5
|
import fs from "fs-extra";
|
|
@@ -1324,7 +1324,10 @@ var increment = 0;
|
|
|
1324
1324
|
function bundleAnalysis(config) {
|
|
1325
1325
|
return visualizer({
|
|
1326
1326
|
template: "raw-data",
|
|
1327
|
-
filename: path3.resolve(
|
|
1327
|
+
filename: path3.resolve(
|
|
1328
|
+
config.analysis.outputDir,
|
|
1329
|
+
`${config.analysis.outputName}-${increment++}.json`
|
|
1330
|
+
)
|
|
1328
1331
|
});
|
|
1329
1332
|
}
|
|
1330
1333
|
|
|
@@ -1698,6 +1701,12 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
1698
1701
|
"~~": root
|
|
1699
1702
|
}).map(([key, value]) => [key, path5.resolve(root, value)])
|
|
1700
1703
|
);
|
|
1704
|
+
const analysisOutputFile = path5.resolve(
|
|
1705
|
+
root,
|
|
1706
|
+
mergedConfig.analysis?.outputFile ?? "stats.html"
|
|
1707
|
+
);
|
|
1708
|
+
const analysisOutputDir = path5.dirname(analysisOutputFile);
|
|
1709
|
+
const analysisOutputName = path5.parse(analysisOutputFile).name;
|
|
1701
1710
|
const finalConfig = {
|
|
1702
1711
|
browser,
|
|
1703
1712
|
command,
|
|
@@ -1727,10 +1736,10 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
1727
1736
|
analysis: {
|
|
1728
1737
|
enabled: mergedConfig.analysis?.enabled ?? false,
|
|
1729
1738
|
template: mergedConfig.analysis?.template ?? "treemap",
|
|
1730
|
-
outputFile:
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1739
|
+
outputFile: analysisOutputFile,
|
|
1740
|
+
outputDir: analysisOutputDir,
|
|
1741
|
+
outputName: analysisOutputName,
|
|
1742
|
+
keepArtifacts: mergedConfig.analysis?.keepArtifacts ?? false
|
|
1734
1743
|
},
|
|
1735
1744
|
userConfigMetadata: userConfigMetadata ?? {},
|
|
1736
1745
|
alias,
|
|
@@ -2833,8 +2842,8 @@ async function internalBuild() {
|
|
|
2833
2842
|
return output;
|
|
2834
2843
|
}
|
|
2835
2844
|
async function combineAnalysisStats() {
|
|
2836
|
-
const unixFiles = await glob3(
|
|
2837
|
-
cwd: wxt.config.
|
|
2845
|
+
const unixFiles = await glob3(`${wxt.config.analysis.outputName}-*.json`, {
|
|
2846
|
+
cwd: wxt.config.analysis.outputDir,
|
|
2838
2847
|
absolute: true
|
|
2839
2848
|
});
|
|
2840
2849
|
const absolutePaths = unixFiles.map(unnormalizePath);
|
|
@@ -2849,7 +2858,9 @@ async function combineAnalysisStats() {
|
|
|
2849
2858
|
],
|
|
2850
2859
|
{ cwd: wxt.config.root, stdio: "inherit" }
|
|
2851
2860
|
);
|
|
2852
|
-
|
|
2861
|
+
if (!wxt.config.analysis.keepArtifacts) {
|
|
2862
|
+
await Promise.all(absolutePaths.map((statsFile) => fs12.remove(statsFile)));
|
|
2863
|
+
}
|
|
2853
2864
|
}
|
|
2854
2865
|
function printValidationResults({
|
|
2855
2866
|
errorCount,
|
package/dist/cli.js
CHANGED
|
@@ -1347,7 +1347,10 @@ var increment = 0;
|
|
|
1347
1347
|
function bundleAnalysis(config) {
|
|
1348
1348
|
return visualizer({
|
|
1349
1349
|
template: "raw-data",
|
|
1350
|
-
filename: path3.resolve(
|
|
1350
|
+
filename: path3.resolve(
|
|
1351
|
+
config.analysis.outputDir,
|
|
1352
|
+
`${config.analysis.outputName}-${increment++}.json`
|
|
1353
|
+
)
|
|
1351
1354
|
});
|
|
1352
1355
|
}
|
|
1353
1356
|
|
|
@@ -1696,6 +1699,12 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
1696
1699
|
"~~": root
|
|
1697
1700
|
}).map(([key, value]) => [key, path4.resolve(root, value)])
|
|
1698
1701
|
);
|
|
1702
|
+
const analysisOutputFile = path4.resolve(
|
|
1703
|
+
root,
|
|
1704
|
+
mergedConfig.analysis?.outputFile ?? "stats.html"
|
|
1705
|
+
);
|
|
1706
|
+
const analysisOutputDir = path4.dirname(analysisOutputFile);
|
|
1707
|
+
const analysisOutputName = path4.parse(analysisOutputFile).name;
|
|
1699
1708
|
const finalConfig = {
|
|
1700
1709
|
browser,
|
|
1701
1710
|
command,
|
|
@@ -1725,10 +1734,10 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
1725
1734
|
analysis: {
|
|
1726
1735
|
enabled: mergedConfig.analysis?.enabled ?? false,
|
|
1727
1736
|
template: mergedConfig.analysis?.template ?? "treemap",
|
|
1728
|
-
outputFile:
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1737
|
+
outputFile: analysisOutputFile,
|
|
1738
|
+
outputDir: analysisOutputDir,
|
|
1739
|
+
outputName: analysisOutputName,
|
|
1740
|
+
keepArtifacts: mergedConfig.analysis?.keepArtifacts ?? false
|
|
1732
1741
|
},
|
|
1733
1742
|
userConfigMetadata: userConfigMetadata ?? {},
|
|
1734
1743
|
alias,
|
|
@@ -2098,7 +2107,7 @@ function getChunkSortWeight(filename) {
|
|
|
2098
2107
|
import pc4 from "picocolors";
|
|
2099
2108
|
|
|
2100
2109
|
// package.json
|
|
2101
|
-
var version = "0.16.
|
|
2110
|
+
var version = "0.16.6";
|
|
2102
2111
|
|
|
2103
2112
|
// src/core/utils/log/printHeader.ts
|
|
2104
2113
|
import { consola as consola2 } from "consola";
|
|
@@ -2840,8 +2849,8 @@ async function internalBuild() {
|
|
|
2840
2849
|
return output;
|
|
2841
2850
|
}
|
|
2842
2851
|
async function combineAnalysisStats() {
|
|
2843
|
-
const unixFiles = await glob3(
|
|
2844
|
-
cwd: wxt.config.
|
|
2852
|
+
const unixFiles = await glob3(`${wxt.config.analysis.outputName}-*.json`, {
|
|
2853
|
+
cwd: wxt.config.analysis.outputDir,
|
|
2845
2854
|
absolute: true
|
|
2846
2855
|
});
|
|
2847
2856
|
const absolutePaths = unixFiles.map(unnormalizePath);
|
|
@@ -2856,7 +2865,9 @@ async function combineAnalysisStats() {
|
|
|
2856
2865
|
],
|
|
2857
2866
|
{ cwd: wxt.config.root, stdio: "inherit" }
|
|
2858
2867
|
);
|
|
2859
|
-
|
|
2868
|
+
if (!wxt.config.analysis.keepArtifacts) {
|
|
2869
|
+
await Promise.all(absolutePaths.map((statsFile) => fs12.remove(statsFile)));
|
|
2870
|
+
}
|
|
2860
2871
|
}
|
|
2861
2872
|
function printValidationResults({
|
|
2862
2873
|
errorCount,
|
package/dist/client.js
CHANGED
|
@@ -369,20 +369,16 @@ function mountUi(root, options) {
|
|
|
369
369
|
anchor.append(root);
|
|
370
370
|
break;
|
|
371
371
|
case "first":
|
|
372
|
-
|
|
373
|
-
anchor.insertBefore(root, anchor.firstChild);
|
|
374
|
-
} else {
|
|
375
|
-
anchor.append(root);
|
|
376
|
-
}
|
|
372
|
+
anchor.prepend(root);
|
|
377
373
|
break;
|
|
378
374
|
case "replace":
|
|
379
375
|
anchor.replaceWith(root);
|
|
380
376
|
break;
|
|
381
377
|
case "after":
|
|
382
|
-
anchor.
|
|
378
|
+
anchor.parentElement?.insertBefore(root, anchor.nextElementSibling);
|
|
383
379
|
break;
|
|
384
380
|
case "before":
|
|
385
|
-
anchor.
|
|
381
|
+
anchor.parentElement?.insertBefore(root, anchor);
|
|
386
382
|
break;
|
|
387
383
|
default:
|
|
388
384
|
options.append(anchor, root);
|
|
@@ -306,9 +306,24 @@ interface InlineConfig {
|
|
|
306
306
|
/**
|
|
307
307
|
* Name of the output HTML file. Relative to the project's root directory.
|
|
308
308
|
*
|
|
309
|
+
* Changing the filename of the outputFile also effects the names of the artifacts generated
|
|
310
|
+
* when setting `keepArtifacts` to true:
|
|
311
|
+
* - "stats.html" => "stats-*.json"
|
|
312
|
+
* - "stats/bundle.html" => "bundle-*.json"
|
|
313
|
+
* - ".analysis/index.html" => "index-*.json"
|
|
314
|
+
*
|
|
309
315
|
* @default "stats.html"
|
|
310
316
|
*/
|
|
311
317
|
outputFile?: string;
|
|
318
|
+
/**
|
|
319
|
+
* By default, the `stats-*.json` artifacts generated during bundle analysis are deleted. Set to
|
|
320
|
+
* `true` to keep them.
|
|
321
|
+
*
|
|
322
|
+
* One stats file is output per build step.
|
|
323
|
+
*
|
|
324
|
+
* @default false
|
|
325
|
+
*/
|
|
326
|
+
keepArtifacts?: boolean;
|
|
312
327
|
};
|
|
313
328
|
/**
|
|
314
329
|
* Add additional paths to the `.wxt/tsconfig.json`. Use this instead of overwriting the `paths`
|
|
@@ -901,8 +916,13 @@ interface ResolvedConfig {
|
|
|
901
916
|
analysis: {
|
|
902
917
|
enabled: boolean;
|
|
903
918
|
template: NonNullable<PluginVisualizerOptions['template']>;
|
|
904
|
-
/** Absolute file path */
|
|
919
|
+
/** Absolute file path to the `stats.html` file */
|
|
905
920
|
outputFile: string;
|
|
921
|
+
/** The directory where the final `stats.html` file is located */
|
|
922
|
+
outputDir: string;
|
|
923
|
+
/** Name of the `stats.html` file, minus ".html" */
|
|
924
|
+
outputName: string;
|
|
925
|
+
keepArtifacts: boolean;
|
|
906
926
|
};
|
|
907
927
|
userConfigMetadata: Omit<ResolvedConfig$1<UserConfig>, 'config'>;
|
|
908
928
|
/**
|
|
@@ -306,9 +306,24 @@ interface InlineConfig {
|
|
|
306
306
|
/**
|
|
307
307
|
* Name of the output HTML file. Relative to the project's root directory.
|
|
308
308
|
*
|
|
309
|
+
* Changing the filename of the outputFile also effects the names of the artifacts generated
|
|
310
|
+
* when setting `keepArtifacts` to true:
|
|
311
|
+
* - "stats.html" => "stats-*.json"
|
|
312
|
+
* - "stats/bundle.html" => "bundle-*.json"
|
|
313
|
+
* - ".analysis/index.html" => "index-*.json"
|
|
314
|
+
*
|
|
309
315
|
* @default "stats.html"
|
|
310
316
|
*/
|
|
311
317
|
outputFile?: string;
|
|
318
|
+
/**
|
|
319
|
+
* By default, the `stats-*.json` artifacts generated during bundle analysis are deleted. Set to
|
|
320
|
+
* `true` to keep them.
|
|
321
|
+
*
|
|
322
|
+
* One stats file is output per build step.
|
|
323
|
+
*
|
|
324
|
+
* @default false
|
|
325
|
+
*/
|
|
326
|
+
keepArtifacts?: boolean;
|
|
312
327
|
};
|
|
313
328
|
/**
|
|
314
329
|
* Add additional paths to the `.wxt/tsconfig.json`. Use this instead of overwriting the `paths`
|
|
@@ -901,8 +916,13 @@ interface ResolvedConfig {
|
|
|
901
916
|
analysis: {
|
|
902
917
|
enabled: boolean;
|
|
903
918
|
template: NonNullable<PluginVisualizerOptions['template']>;
|
|
904
|
-
/** Absolute file path */
|
|
919
|
+
/** Absolute file path to the `stats.html` file */
|
|
905
920
|
outputFile: string;
|
|
921
|
+
/** The directory where the final `stats.html` file is located */
|
|
922
|
+
outputDir: string;
|
|
923
|
+
/** Name of the `stats.html` file, minus ".html" */
|
|
924
|
+
outputName: string;
|
|
925
|
+
keepArtifacts: boolean;
|
|
906
926
|
};
|
|
907
927
|
userConfigMetadata: Omit<ResolvedConfig$1<UserConfig>, 'config'>;
|
|
908
928
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -3770,7 +3770,10 @@ var increment = 0;
|
|
|
3770
3770
|
function bundleAnalysis(config) {
|
|
3771
3771
|
return (0, import_rollup_plugin_visualizer.visualizer)({
|
|
3772
3772
|
template: "raw-data",
|
|
3773
|
-
filename: import_node_path6.default.resolve(
|
|
3773
|
+
filename: import_node_path6.default.resolve(
|
|
3774
|
+
config.analysis.outputDir,
|
|
3775
|
+
`${config.analysis.outputName}-${increment++}.json`
|
|
3776
|
+
)
|
|
3774
3777
|
});
|
|
3775
3778
|
}
|
|
3776
3779
|
|
|
@@ -4122,6 +4125,12 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
4122
4125
|
"~~": root
|
|
4123
4126
|
}).map(([key, value]) => [key, import_node_path8.default.resolve(root, value)])
|
|
4124
4127
|
);
|
|
4128
|
+
const analysisOutputFile = import_node_path8.default.resolve(
|
|
4129
|
+
root,
|
|
4130
|
+
mergedConfig.analysis?.outputFile ?? "stats.html"
|
|
4131
|
+
);
|
|
4132
|
+
const analysisOutputDir = import_node_path8.default.dirname(analysisOutputFile);
|
|
4133
|
+
const analysisOutputName = import_node_path8.default.parse(analysisOutputFile).name;
|
|
4125
4134
|
const finalConfig = {
|
|
4126
4135
|
browser,
|
|
4127
4136
|
command,
|
|
@@ -4151,10 +4160,10 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
4151
4160
|
analysis: {
|
|
4152
4161
|
enabled: mergedConfig.analysis?.enabled ?? false,
|
|
4153
4162
|
template: mergedConfig.analysis?.template ?? "treemap",
|
|
4154
|
-
outputFile:
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4163
|
+
outputFile: analysisOutputFile,
|
|
4164
|
+
outputDir: analysisOutputDir,
|
|
4165
|
+
outputName: analysisOutputName,
|
|
4166
|
+
keepArtifacts: mergedConfig.analysis?.keepArtifacts ?? false
|
|
4158
4167
|
},
|
|
4159
4168
|
userConfigMetadata: userConfigMetadata ?? {},
|
|
4160
4169
|
alias,
|
|
@@ -4525,7 +4534,7 @@ function getChunkSortWeight(filename) {
|
|
|
4525
4534
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
4526
4535
|
|
|
4527
4536
|
// package.json
|
|
4528
|
-
var version = "0.16.
|
|
4537
|
+
var version = "0.16.6";
|
|
4529
4538
|
|
|
4530
4539
|
// src/core/utils/log/printHeader.ts
|
|
4531
4540
|
var import_consola2 = require("consola");
|
|
@@ -5263,8 +5272,8 @@ async function internalBuild() {
|
|
|
5263
5272
|
return output;
|
|
5264
5273
|
}
|
|
5265
5274
|
async function combineAnalysisStats() {
|
|
5266
|
-
const unixFiles = await (0, import_fast_glob3.default)(
|
|
5267
|
-
cwd: wxt.config.
|
|
5275
|
+
const unixFiles = await (0, import_fast_glob3.default)(`${wxt.config.analysis.outputName}-*.json`, {
|
|
5276
|
+
cwd: wxt.config.analysis.outputDir,
|
|
5268
5277
|
absolute: true
|
|
5269
5278
|
});
|
|
5270
5279
|
const absolutePaths = unixFiles.map(unnormalizePath);
|
|
@@ -5279,7 +5288,9 @@ async function combineAnalysisStats() {
|
|
|
5279
5288
|
],
|
|
5280
5289
|
{ cwd: wxt.config.root, stdio: "inherit" }
|
|
5281
5290
|
);
|
|
5282
|
-
|
|
5291
|
+
if (!wxt.config.analysis.keepArtifacts) {
|
|
5292
|
+
await Promise.all(absolutePaths.map((statsFile) => import_fs_extra12.default.remove(statsFile)));
|
|
5293
|
+
}
|
|
5283
5294
|
}
|
|
5284
5295
|
function printValidationResults({
|
|
5285
5296
|
errorCount,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-
|
|
2
|
-
export { q as BackgroundDefinition, h as BackgroundEntrypoint, g as BaseEntrypoint, f as BaseEntrypointOptions, d as BuildStepOutput, w as ConfigEnv, p as ContentScriptBaseDefinition, m as ContentScriptDefinition, C as ContentScriptEntrypoint, n as ContentScriptIsolatedWorldDefinition, o as ContentScriptMainWorldDefinition, j as Entrypoint, k as EntrypointGroup, t as ExcludableEntrypoint, D as ExtensionRunner, F as FsCache, G as GenericEntrypoint, H as HookResult, L as Logger, l as OnContentScriptStopped, i as OptionsEntrypoint, c as OutputAsset, b as OutputChunk, O as OutputFile, s as PerBrowserOption, P as PopupEntrypoint, R as ResolvedConfig, S as ServerInfo, T as TargetBrowser, e as TargetManifestVersion, r as UnlistedScriptDefinition, u as UserManifest, v as UserManifestFn, V as VirtualEntrypointType, A as Wxt, x as WxtBuilder, y as WxtBuilderServer, z as WxtHooks, a as WxtViteConfig } from './index-
|
|
1
|
+
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-avHSnR0o.cjs';
|
|
2
|
+
export { q as BackgroundDefinition, h as BackgroundEntrypoint, g as BaseEntrypoint, f as BaseEntrypointOptions, d as BuildStepOutput, w as ConfigEnv, p as ContentScriptBaseDefinition, m as ContentScriptDefinition, C as ContentScriptEntrypoint, n as ContentScriptIsolatedWorldDefinition, o as ContentScriptMainWorldDefinition, j as Entrypoint, k as EntrypointGroup, t as ExcludableEntrypoint, D as ExtensionRunner, F as FsCache, G as GenericEntrypoint, H as HookResult, L as Logger, l as OnContentScriptStopped, i as OptionsEntrypoint, c as OutputAsset, b as OutputChunk, O as OutputFile, s as PerBrowserOption, P as PopupEntrypoint, R as ResolvedConfig, S as ServerInfo, T as TargetBrowser, e as TargetManifestVersion, r as UnlistedScriptDefinition, u as UserManifest, v as UserManifestFn, V as VirtualEntrypointType, A as Wxt, x as WxtBuilder, y as WxtBuilderServer, z as WxtHooks, a as WxtViteConfig } from './index-avHSnR0o.cjs';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
@@ -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.6";
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-
|
|
2
|
-
export { q as BackgroundDefinition, h as BackgroundEntrypoint, g as BaseEntrypoint, f as BaseEntrypointOptions, d as BuildStepOutput, w as ConfigEnv, p as ContentScriptBaseDefinition, m as ContentScriptDefinition, C as ContentScriptEntrypoint, n as ContentScriptIsolatedWorldDefinition, o as ContentScriptMainWorldDefinition, j as Entrypoint, k as EntrypointGroup, t as ExcludableEntrypoint, D as ExtensionRunner, F as FsCache, G as GenericEntrypoint, H as HookResult, L as Logger, l as OnContentScriptStopped, i as OptionsEntrypoint, c as OutputAsset, b as OutputChunk, O as OutputFile, s as PerBrowserOption, P as PopupEntrypoint, R as ResolvedConfig, S as ServerInfo, T as TargetBrowser, e as TargetManifestVersion, r as UnlistedScriptDefinition, u as UserManifest, v as UserManifestFn, V as VirtualEntrypointType, A as Wxt, x as WxtBuilder, y as WxtBuilderServer, z as WxtHooks, a as WxtViteConfig } from './index-
|
|
1
|
+
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-avHSnR0o.js';
|
|
2
|
+
export { q as BackgroundDefinition, h as BackgroundEntrypoint, g as BaseEntrypoint, f as BaseEntrypointOptions, d as BuildStepOutput, w as ConfigEnv, p as ContentScriptBaseDefinition, m as ContentScriptDefinition, C as ContentScriptEntrypoint, n as ContentScriptIsolatedWorldDefinition, o as ContentScriptMainWorldDefinition, j as Entrypoint, k as EntrypointGroup, t as ExcludableEntrypoint, D as ExtensionRunner, F as FsCache, G as GenericEntrypoint, H as HookResult, L as Logger, l as OnContentScriptStopped, i as OptionsEntrypoint, c as OutputAsset, b as OutputChunk, O as OutputFile, s as PerBrowserOption, P as PopupEntrypoint, R as ResolvedConfig, S as ServerInfo, T as TargetBrowser, e as TargetManifestVersion, r as UnlistedScriptDefinition, u as UserManifest, v as UserManifestFn, V as VirtualEntrypointType, A as Wxt, x as WxtBuilder, y as WxtBuilderServer, z as WxtHooks, a as WxtViteConfig } from './index-avHSnR0o.js';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
@@ -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.6";
|
|
68
68
|
|
|
69
69
|
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
|
@@ -512,7 +512,10 @@ var increment = 0;
|
|
|
512
512
|
function bundleAnalysis(config) {
|
|
513
513
|
return (0, import_rollup_plugin_visualizer.visualizer)({
|
|
514
514
|
template: "raw-data",
|
|
515
|
-
filename: import_node_path5.default.resolve(
|
|
515
|
+
filename: import_node_path5.default.resolve(
|
|
516
|
+
config.analysis.outputDir,
|
|
517
|
+
`${config.analysis.outputName}-${increment++}.json`
|
|
518
|
+
)
|
|
516
519
|
});
|
|
517
520
|
}
|
|
518
521
|
|
|
@@ -1041,6 +1044,12 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
1041
1044
|
"~~": root
|
|
1042
1045
|
}).map(([key, value]) => [key, import_node_path8.default.resolve(root, value)])
|
|
1043
1046
|
);
|
|
1047
|
+
const analysisOutputFile = import_node_path8.default.resolve(
|
|
1048
|
+
root,
|
|
1049
|
+
mergedConfig.analysis?.outputFile ?? "stats.html"
|
|
1050
|
+
);
|
|
1051
|
+
const analysisOutputDir = import_node_path8.default.dirname(analysisOutputFile);
|
|
1052
|
+
const analysisOutputName = import_node_path8.default.parse(analysisOutputFile).name;
|
|
1044
1053
|
const finalConfig = {
|
|
1045
1054
|
browser,
|
|
1046
1055
|
command,
|
|
@@ -1070,10 +1079,10 @@ async function resolveConfig(inlineConfig, command, server) {
|
|
|
1070
1079
|
analysis: {
|
|
1071
1080
|
enabled: mergedConfig.analysis?.enabled ?? false,
|
|
1072
1081
|
template: mergedConfig.analysis?.template ?? "treemap",
|
|
1073
|
-
outputFile:
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1082
|
+
outputFile: analysisOutputFile,
|
|
1083
|
+
outputDir: analysisOutputDir,
|
|
1084
|
+
outputName: analysisOutputName,
|
|
1085
|
+
keepArtifacts: mergedConfig.analysis?.keepArtifacts ?? false
|
|
1077
1086
|
},
|
|
1078
1087
|
userConfigMetadata: userConfigMetadata ?? {},
|
|
1079
1088
|
alias,
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FakeBrowser, fakeBrowser } from '@webext-core/fake-browser';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
|
-
import { I as InlineConfig } from './index-
|
|
3
|
+
import { I as InlineConfig } from './index-avHSnR0o.cjs';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
6
6
|
import 'consola';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FakeBrowser, fakeBrowser } from '@webext-core/fake-browser';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
|
-
import { I as InlineConfig } from './index-
|
|
3
|
+
import { I as InlineConfig } from './index-avHSnR0o.js';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
6
6
|
import 'consola';
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
package/dist/cli.d.ts
DELETED