wxt 0.18.12 → 0.18.14
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-6QN6UXBH.js → chunk-ZONHOHIX.js} +14 -8
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +14 -8
- package/dist/client.d.ts +1 -1
- package/dist/client.js +14 -2
- package/dist/{index-1N-eQJJh.d.cts → index-CM35KuSH.d.cts} +6 -0
- package/dist/{index-1N-eQJJh.d.ts → index-CM35KuSH.d.ts} +6 -0
- package/dist/index.cjs +14 -8
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/modules.d.cts +1 -1
- package/dist/modules.d.ts +1 -1
- package/dist/testing.cjs +12 -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
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-QGM4M3NI.js";
|
|
17
17
|
|
|
18
18
|
// package.json
|
|
19
|
-
var version = "0.18.
|
|
19
|
+
var version = "0.18.13";
|
|
20
20
|
|
|
21
21
|
// src/core/utils/paths.ts
|
|
22
22
|
import systemPath from "node:path";
|
|
@@ -1425,8 +1425,7 @@ async function generateTypesDir(entrypoints) {
|
|
|
1425
1425
|
{ module: "wxt/vite-builder-env" }
|
|
1426
1426
|
];
|
|
1427
1427
|
wxt.config.userModules.forEach((module) => {
|
|
1428
|
-
if (module.type === "node_module"
|
|
1429
|
-
entries.push({ module: module.id });
|
|
1428
|
+
if (module.type === "node_module") entries.push({ module: module.id });
|
|
1430
1429
|
});
|
|
1431
1430
|
entries.push(await getPathsDeclarationEntry(entrypoints));
|
|
1432
1431
|
entries.push(await getI18nDeclarationEntry());
|
|
@@ -1716,7 +1715,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
1716
1715
|
}
|
|
1717
1716
|
devServerConfig = {
|
|
1718
1717
|
port,
|
|
1719
|
-
hostname: "localhost"
|
|
1718
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
1720
1719
|
};
|
|
1721
1720
|
}
|
|
1722
1721
|
const userModules = await resolveWxtUserModules(
|
|
@@ -1791,9 +1790,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
1791
1790
|
userConfig.transformManifest?.(manifest2);
|
|
1792
1791
|
inlineConfig.transformManifest?.(manifest2);
|
|
1793
1792
|
};
|
|
1794
|
-
const
|
|
1793
|
+
const merged = defu(inlineConfig, userConfig);
|
|
1794
|
+
const builderConfig = await mergeBuilderConfig(
|
|
1795
|
+
merged.logger ?? consola,
|
|
1796
|
+
inlineConfig,
|
|
1797
|
+
userConfig
|
|
1798
|
+
);
|
|
1795
1799
|
return {
|
|
1796
|
-
...
|
|
1800
|
+
...merged,
|
|
1797
1801
|
// Custom merge values
|
|
1798
1802
|
transformManifest,
|
|
1799
1803
|
imports,
|
|
@@ -1916,8 +1920,10 @@ var COMMAND_MODES = {
|
|
|
1916
1920
|
build: "production",
|
|
1917
1921
|
serve: "development"
|
|
1918
1922
|
};
|
|
1919
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
1920
|
-
const vite = await import("vite").catch(() =>
|
|
1923
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
1924
|
+
const vite = await import("vite").catch((err) => {
|
|
1925
|
+
logger.debug("Failed to import vite:", err);
|
|
1926
|
+
});
|
|
1921
1927
|
if (vite) {
|
|
1922
1928
|
return {
|
|
1923
1929
|
vite: async (env) => {
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
CHANGED
|
@@ -1988,8 +1988,7 @@ async function generateTypesDir(entrypoints) {
|
|
|
1988
1988
|
{ module: "wxt/vite-builder-env" }
|
|
1989
1989
|
];
|
|
1990
1990
|
wxt.config.userModules.forEach((module) => {
|
|
1991
|
-
if (module.type === "node_module"
|
|
1992
|
-
entries.push({ module: module.id });
|
|
1991
|
+
if (module.type === "node_module") entries.push({ module: module.id });
|
|
1993
1992
|
});
|
|
1994
1993
|
entries.push(await getPathsDeclarationEntry(entrypoints));
|
|
1995
1994
|
entries.push(await getI18nDeclarationEntry());
|
|
@@ -2276,7 +2275,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
2276
2275
|
}
|
|
2277
2276
|
devServerConfig = {
|
|
2278
2277
|
port,
|
|
2279
|
-
hostname: "localhost"
|
|
2278
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
2280
2279
|
};
|
|
2281
2280
|
}
|
|
2282
2281
|
const userModules = await resolveWxtUserModules(
|
|
@@ -2351,9 +2350,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
2351
2350
|
userConfig.transformManifest?.(manifest2);
|
|
2352
2351
|
inlineConfig.transformManifest?.(manifest2);
|
|
2353
2352
|
};
|
|
2354
|
-
const
|
|
2353
|
+
const merged = defu(inlineConfig, userConfig);
|
|
2354
|
+
const builderConfig = await mergeBuilderConfig(
|
|
2355
|
+
merged.logger ?? consola,
|
|
2356
|
+
inlineConfig,
|
|
2357
|
+
userConfig
|
|
2358
|
+
);
|
|
2355
2359
|
return {
|
|
2356
|
-
...
|
|
2360
|
+
...merged,
|
|
2357
2361
|
// Custom merge values
|
|
2358
2362
|
transformManifest,
|
|
2359
2363
|
imports,
|
|
@@ -2476,8 +2480,10 @@ var COMMAND_MODES = {
|
|
|
2476
2480
|
build: "production",
|
|
2477
2481
|
serve: "development"
|
|
2478
2482
|
};
|
|
2479
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
2480
|
-
const vite2 = await import("vite").catch(() =>
|
|
2483
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
2484
|
+
const vite2 = await import("vite").catch((err) => {
|
|
2485
|
+
logger.debug("Failed to import vite:", err);
|
|
2486
|
+
});
|
|
2481
2487
|
if (vite2) {
|
|
2482
2488
|
return {
|
|
2483
2489
|
vite: async (env) => {
|
|
@@ -2782,7 +2788,7 @@ function getChunkSortWeight(filename) {
|
|
|
2782
2788
|
import pc4 from "picocolors";
|
|
2783
2789
|
|
|
2784
2790
|
// package.json
|
|
2785
|
-
var version = "0.18.
|
|
2791
|
+
var version = "0.18.13";
|
|
2786
2792
|
|
|
2787
2793
|
// src/core/utils/log/printHeader.ts
|
|
2788
2794
|
function printHeader() {
|
package/dist/client.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ interface ContentScriptModalPositioningOptions {
|
|
|
159
159
|
type ContentScriptPositioningOptions = ContentScriptInlinePositioningOptions | ContentScriptOverlayPositioningOptions | ContentScriptModalPositioningOptions;
|
|
160
160
|
interface ContentScriptAnchoredOptions {
|
|
161
161
|
/**
|
|
162
|
-
* A CSS selector, element, or function that returns one of the
|
|
162
|
+
* A CSS selector, XPath expression, element, or function that returns one of the three. Along with `append`, the
|
|
163
163
|
* `anchor` dictates where in the page the UI will be added.
|
|
164
164
|
*/
|
|
165
165
|
anchor?: string | Element | null | undefined | (() => string | Element | null | undefined);
|
package/dist/client.js
CHANGED
|
@@ -350,8 +350,20 @@ function applyPosition(root, positionedElement, options) {
|
|
|
350
350
|
function getAnchor(options) {
|
|
351
351
|
if (options.anchor == null) return document.body;
|
|
352
352
|
let resolved = typeof options.anchor === "function" ? options.anchor() : options.anchor;
|
|
353
|
-
if (typeof resolved === "string")
|
|
354
|
-
|
|
353
|
+
if (typeof resolved === "string") {
|
|
354
|
+
if (resolved.startsWith("/")) {
|
|
355
|
+
const result = document.evaluate(
|
|
356
|
+
resolved,
|
|
357
|
+
document,
|
|
358
|
+
null,
|
|
359
|
+
XPathResult.FIRST_ORDERED_NODE_TYPE,
|
|
360
|
+
null
|
|
361
|
+
);
|
|
362
|
+
return result.singleNodeValue ?? void 0;
|
|
363
|
+
} else {
|
|
364
|
+
return document.querySelector(resolved) ?? void 0;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
355
367
|
return resolved ?? void 0;
|
|
356
368
|
}
|
|
357
369
|
function mountUi(root, options) {
|
|
@@ -455,6 +455,12 @@ interface InlineConfig {
|
|
|
455
455
|
* Port to run the dev server on. Defaults to the first open port from 3000 to 3010.
|
|
456
456
|
*/
|
|
457
457
|
port?: number;
|
|
458
|
+
/**
|
|
459
|
+
* Hostname to run the dev server on.
|
|
460
|
+
*
|
|
461
|
+
* @default "localhost"
|
|
462
|
+
*/
|
|
463
|
+
hostname?: string;
|
|
458
464
|
};
|
|
459
465
|
/**
|
|
460
466
|
* Controls whether a custom keyboard shortcut command, `Alt+R`, is added during dev mode to
|
|
@@ -455,6 +455,12 @@ interface InlineConfig {
|
|
|
455
455
|
* Port to run the dev server on. Defaults to the first open port from 3000 to 3010.
|
|
456
456
|
*/
|
|
457
457
|
port?: number;
|
|
458
|
+
/**
|
|
459
|
+
* Hostname to run the dev server on.
|
|
460
|
+
*
|
|
461
|
+
* @default "localhost"
|
|
462
|
+
*/
|
|
463
|
+
hostname?: string;
|
|
458
464
|
};
|
|
459
465
|
/**
|
|
460
466
|
* Controls whether a custom keyboard shortcut command, `Alt+R`, is added during dev mode to
|
package/dist/index.cjs
CHANGED
|
@@ -12157,8 +12157,7 @@ async function generateTypesDir(entrypoints) {
|
|
|
12157
12157
|
{ module: "wxt/vite-builder-env" }
|
|
12158
12158
|
];
|
|
12159
12159
|
wxt.config.userModules.forEach((module2) => {
|
|
12160
|
-
if (module2.type === "node_module"
|
|
12161
|
-
entries.push({ module: module2.id });
|
|
12160
|
+
if (module2.type === "node_module") entries.push({ module: module2.id });
|
|
12162
12161
|
});
|
|
12163
12162
|
entries.push(await getPathsDeclarationEntry(entrypoints));
|
|
12164
12163
|
entries.push(await getI18nDeclarationEntry());
|
|
@@ -12457,7 +12456,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
12457
12456
|
}
|
|
12458
12457
|
devServerConfig = {
|
|
12459
12458
|
port,
|
|
12460
|
-
hostname: "localhost"
|
|
12459
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
12461
12460
|
};
|
|
12462
12461
|
}
|
|
12463
12462
|
const userModules = await resolveWxtUserModules(
|
|
@@ -12532,9 +12531,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
12532
12531
|
userConfig.transformManifest?.(manifest2);
|
|
12533
12532
|
inlineConfig.transformManifest?.(manifest2);
|
|
12534
12533
|
};
|
|
12535
|
-
const
|
|
12534
|
+
const merged = (0, import_defu.default)(inlineConfig, userConfig);
|
|
12535
|
+
const builderConfig = await mergeBuilderConfig(
|
|
12536
|
+
merged.logger ?? consola,
|
|
12537
|
+
inlineConfig,
|
|
12538
|
+
userConfig
|
|
12539
|
+
);
|
|
12536
12540
|
return {
|
|
12537
|
-
...
|
|
12541
|
+
...merged,
|
|
12538
12542
|
// Custom merge values
|
|
12539
12543
|
transformManifest,
|
|
12540
12544
|
imports,
|
|
@@ -12657,8 +12661,10 @@ var COMMAND_MODES = {
|
|
|
12657
12661
|
build: "production",
|
|
12658
12662
|
serve: "development"
|
|
12659
12663
|
};
|
|
12660
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
12661
|
-
const vite2 = await import("vite").catch(() =>
|
|
12664
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
12665
|
+
const vite2 = await import("vite").catch((err) => {
|
|
12666
|
+
logger.debug("Failed to import vite:", err);
|
|
12667
|
+
});
|
|
12662
12668
|
if (vite2) {
|
|
12663
12669
|
return {
|
|
12664
12670
|
vite: async (env2) => {
|
|
@@ -12964,7 +12970,7 @@ function getChunkSortWeight(filename) {
|
|
|
12964
12970
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
12965
12971
|
|
|
12966
12972
|
// package.json
|
|
12967
|
-
var version = "0.18.
|
|
12973
|
+
var version = "0.18.13";
|
|
12968
12974
|
|
|
12969
12975
|
// src/core/utils/building/internal-build.ts
|
|
12970
12976
|
var import_fast_glob5 = __toESM(require("fast-glob"), 1);
|
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 { x as BackgroundDefinition, n as BackgroundEntrypoint, i as BackgroundEntrypointOptions, j as BaseContentScriptEntrypointOptions, m as BaseEntrypoint, h as BaseEntrypointOptions, e as BuildStepOutput, J as ConfigEnv, w as ContentScriptDefinition, C as ContentScriptEntrypoint, ac as CopiedPublicFile, a5 as Dependency, r as Entrypoint, s as EntrypointGroup, $ as EslintGlobalsPropValue, a0 as Eslintrc, _ as ExtensionRunner, Z as FsCache, ad as GeneratedPublicFile, G as GenericEntrypoint, X as HookResult, u as IsolatedWorldContentScriptDefinition, k as IsolatedWorldContentScriptEntrypointOptions, L as Logger, v as MainWorldContentScriptDefinition, M as MainWorldContentScriptEntrypointOptions, t as OnContentScriptStopped, p as OptionsEntrypoint, l as OptionsEntrypointOptions, d as OutputAsset, c as OutputChunk, O as OutputFile, A as PerBrowserMap, z as PerBrowserOption, o as PopupEntrypoint, P as PopupEntrypointOptions, f as ReloadContentScriptPayload, ab as ResolvedBasePublicFile, R as ResolvedConfig, a1 as ResolvedEslintrc, D as ResolvedPerBrowserOptions, aa as ResolvedPublicFile, V as ServerInfo, q as SidepanelEntrypoint, S as SidepanelEntrypointOptions, T as TargetBrowser, g as TargetManifestVersion, y as UnlistedScriptDefinition, F as UserManifest, H as UserManifestFn, Y as Wxt, N as WxtBuilder, Q as WxtBuilderServer, K as WxtCommand, af as WxtDirEntry, ah as WxtDirFileEntry, ag as WxtDirTypeReferenceEntry, b as WxtHooks, a8 as WxtModule, a6 as WxtModuleOptions, a7 as WxtModuleSetup, a9 as WxtModuleWithMetadata, a4 as WxtPackageManager, ae as WxtPlugin, a3 as WxtResolvedUnimportOptions, a2 as WxtUnimportOptions, a as WxtViteConfig } from './index-
|
|
1
|
+
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-CM35KuSH.cjs';
|
|
2
|
+
export { x as BackgroundDefinition, n as BackgroundEntrypoint, i as BackgroundEntrypointOptions, j as BaseContentScriptEntrypointOptions, m as BaseEntrypoint, h as BaseEntrypointOptions, e as BuildStepOutput, J as ConfigEnv, w as ContentScriptDefinition, C as ContentScriptEntrypoint, ac as CopiedPublicFile, a5 as Dependency, r as Entrypoint, s as EntrypointGroup, $ as EslintGlobalsPropValue, a0 as Eslintrc, _ as ExtensionRunner, Z as FsCache, ad as GeneratedPublicFile, G as GenericEntrypoint, X as HookResult, u as IsolatedWorldContentScriptDefinition, k as IsolatedWorldContentScriptEntrypointOptions, L as Logger, v as MainWorldContentScriptDefinition, M as MainWorldContentScriptEntrypointOptions, t as OnContentScriptStopped, p as OptionsEntrypoint, l as OptionsEntrypointOptions, d as OutputAsset, c as OutputChunk, O as OutputFile, A as PerBrowserMap, z as PerBrowserOption, o as PopupEntrypoint, P as PopupEntrypointOptions, f as ReloadContentScriptPayload, ab as ResolvedBasePublicFile, R as ResolvedConfig, a1 as ResolvedEslintrc, D as ResolvedPerBrowserOptions, aa as ResolvedPublicFile, V as ServerInfo, q as SidepanelEntrypoint, S as SidepanelEntrypointOptions, T as TargetBrowser, g as TargetManifestVersion, y as UnlistedScriptDefinition, F as UserManifest, H as UserManifestFn, Y as Wxt, N as WxtBuilder, Q as WxtBuilderServer, K as WxtCommand, af as WxtDirEntry, ah as WxtDirFileEntry, ag as WxtDirTypeReferenceEntry, b as WxtHooks, a8 as WxtModule, a6 as WxtModuleOptions, a7 as WxtModuleSetup, a9 as WxtModuleWithMetadata, a4 as WxtPackageManager, ae as WxtPlugin, a3 as WxtResolvedUnimportOptions, a2 as WxtUnimportOptions, a as WxtViteConfig } from './index-CM35KuSH.cjs';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
@@ -76,6 +76,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
76
76
|
*/
|
|
77
77
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
78
78
|
|
|
79
|
-
var version = "0.18.
|
|
79
|
+
var version = "0.18.13";
|
|
80
80
|
|
|
81
81
|
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 { x as BackgroundDefinition, n as BackgroundEntrypoint, i as BackgroundEntrypointOptions, j as BaseContentScriptEntrypointOptions, m as BaseEntrypoint, h as BaseEntrypointOptions, e as BuildStepOutput, J as ConfigEnv, w as ContentScriptDefinition, C as ContentScriptEntrypoint, ac as CopiedPublicFile, a5 as Dependency, r as Entrypoint, s as EntrypointGroup, $ as EslintGlobalsPropValue, a0 as Eslintrc, _ as ExtensionRunner, Z as FsCache, ad as GeneratedPublicFile, G as GenericEntrypoint, X as HookResult, u as IsolatedWorldContentScriptDefinition, k as IsolatedWorldContentScriptEntrypointOptions, L as Logger, v as MainWorldContentScriptDefinition, M as MainWorldContentScriptEntrypointOptions, t as OnContentScriptStopped, p as OptionsEntrypoint, l as OptionsEntrypointOptions, d as OutputAsset, c as OutputChunk, O as OutputFile, A as PerBrowserMap, z as PerBrowserOption, o as PopupEntrypoint, P as PopupEntrypointOptions, f as ReloadContentScriptPayload, ab as ResolvedBasePublicFile, R as ResolvedConfig, a1 as ResolvedEslintrc, D as ResolvedPerBrowserOptions, aa as ResolvedPublicFile, V as ServerInfo, q as SidepanelEntrypoint, S as SidepanelEntrypointOptions, T as TargetBrowser, g as TargetManifestVersion, y as UnlistedScriptDefinition, F as UserManifest, H as UserManifestFn, Y as Wxt, N as WxtBuilder, Q as WxtBuilderServer, K as WxtCommand, af as WxtDirEntry, ah as WxtDirFileEntry, ag as WxtDirTypeReferenceEntry, b as WxtHooks, a8 as WxtModule, a6 as WxtModuleOptions, a7 as WxtModuleSetup, a9 as WxtModuleWithMetadata, a4 as WxtPackageManager, ae as WxtPlugin, a3 as WxtResolvedUnimportOptions, a2 as WxtUnimportOptions, a as WxtViteConfig } from './index-
|
|
1
|
+
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-CM35KuSH.js';
|
|
2
|
+
export { x as BackgroundDefinition, n as BackgroundEntrypoint, i as BackgroundEntrypointOptions, j as BaseContentScriptEntrypointOptions, m as BaseEntrypoint, h as BaseEntrypointOptions, e as BuildStepOutput, J as ConfigEnv, w as ContentScriptDefinition, C as ContentScriptEntrypoint, ac as CopiedPublicFile, a5 as Dependency, r as Entrypoint, s as EntrypointGroup, $ as EslintGlobalsPropValue, a0 as Eslintrc, _ as ExtensionRunner, Z as FsCache, ad as GeneratedPublicFile, G as GenericEntrypoint, X as HookResult, u as IsolatedWorldContentScriptDefinition, k as IsolatedWorldContentScriptEntrypointOptions, L as Logger, v as MainWorldContentScriptDefinition, M as MainWorldContentScriptEntrypointOptions, t as OnContentScriptStopped, p as OptionsEntrypoint, l as OptionsEntrypointOptions, d as OutputAsset, c as OutputChunk, O as OutputFile, A as PerBrowserMap, z as PerBrowserOption, o as PopupEntrypoint, P as PopupEntrypointOptions, f as ReloadContentScriptPayload, ab as ResolvedBasePublicFile, R as ResolvedConfig, a1 as ResolvedEslintrc, D as ResolvedPerBrowserOptions, aa as ResolvedPublicFile, V as ServerInfo, q as SidepanelEntrypoint, S as SidepanelEntrypointOptions, T as TargetBrowser, g as TargetManifestVersion, y as UnlistedScriptDefinition, F as UserManifest, H as UserManifestFn, Y as Wxt, N as WxtBuilder, Q as WxtBuilderServer, K as WxtCommand, af as WxtDirEntry, ah as WxtDirFileEntry, ag as WxtDirTypeReferenceEntry, b as WxtHooks, a8 as WxtModule, a6 as WxtModuleOptions, a7 as WxtModuleSetup, a9 as WxtModuleWithMetadata, a4 as WxtPackageManager, ae as WxtPlugin, a3 as WxtResolvedUnimportOptions, a2 as WxtUnimportOptions, a as WxtViteConfig } from './index-CM35KuSH.js';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
@@ -76,6 +76,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
76
76
|
*/
|
|
77
77
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
78
78
|
|
|
79
|
-
var version = "0.18.
|
|
79
|
+
var version = "0.18.13";
|
|
80
80
|
|
|
81
81
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
package/dist/modules.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-
|
|
1
|
+
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-CM35KuSH.cjs';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
3
|
import { UnimportOptions } from 'unimport';
|
|
4
4
|
import 'webextension-polyfill';
|
package/dist/modules.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-
|
|
1
|
+
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-CM35KuSH.js';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
3
|
import { UnimportOptions } from 'unimport';
|
|
4
4
|
import 'webextension-polyfill';
|
package/dist/testing.cjs
CHANGED
|
@@ -2462,7 +2462,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
devServerConfig = {
|
|
2464
2464
|
port,
|
|
2465
|
-
hostname: "localhost"
|
|
2465
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
2466
2466
|
};
|
|
2467
2467
|
}
|
|
2468
2468
|
const userModules = await resolveWxtUserModules(
|
|
@@ -2537,9 +2537,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
2537
2537
|
userConfig.transformManifest?.(manifest2);
|
|
2538
2538
|
inlineConfig.transformManifest?.(manifest2);
|
|
2539
2539
|
};
|
|
2540
|
-
const
|
|
2540
|
+
const merged = (0, import_defu.default)(inlineConfig, userConfig);
|
|
2541
|
+
const builderConfig = await mergeBuilderConfig(
|
|
2542
|
+
merged.logger ?? consola,
|
|
2543
|
+
inlineConfig,
|
|
2544
|
+
userConfig
|
|
2545
|
+
);
|
|
2541
2546
|
return {
|
|
2542
|
-
...
|
|
2547
|
+
...merged,
|
|
2543
2548
|
// Custom merge values
|
|
2544
2549
|
transformManifest,
|
|
2545
2550
|
imports,
|
|
@@ -2662,8 +2667,10 @@ var COMMAND_MODES = {
|
|
|
2662
2667
|
build: "production",
|
|
2663
2668
|
serve: "development"
|
|
2664
2669
|
};
|
|
2665
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
2666
|
-
const vite2 = await import("vite").catch(() =>
|
|
2670
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
2671
|
+
const vite2 = await import("vite").catch((err) => {
|
|
2672
|
+
logger.debug("Failed to import vite:", err);
|
|
2673
|
+
});
|
|
2667
2674
|
if (vite2) {
|
|
2668
2675
|
return {
|
|
2669
2676
|
vite: async (env2) => {
|
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-CM35KuSH.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-CM35KuSH.js';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
6
6
|
import 'consola';
|
package/dist/testing.js
CHANGED