wxt 0.18.12 → 0.18.13
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-TENM236J.js} +13 -6
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +13 -6
- 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 +13 -6
- 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.12";
|
|
20
20
|
|
|
21
21
|
// src/core/utils/paths.ts
|
|
22
22
|
import systemPath from "node:path";
|
|
@@ -1716,7 +1716,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
devServerConfig = {
|
|
1718
1718
|
port,
|
|
1719
|
-
hostname: "localhost"
|
|
1719
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
1720
1720
|
};
|
|
1721
1721
|
}
|
|
1722
1722
|
const userModules = await resolveWxtUserModules(
|
|
@@ -1791,9 +1791,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
1791
1791
|
userConfig.transformManifest?.(manifest2);
|
|
1792
1792
|
inlineConfig.transformManifest?.(manifest2);
|
|
1793
1793
|
};
|
|
1794
|
-
const
|
|
1794
|
+
const merged = defu(inlineConfig, userConfig);
|
|
1795
|
+
const builderConfig = await mergeBuilderConfig(
|
|
1796
|
+
merged.logger ?? consola,
|
|
1797
|
+
inlineConfig,
|
|
1798
|
+
userConfig
|
|
1799
|
+
);
|
|
1795
1800
|
return {
|
|
1796
|
-
...
|
|
1801
|
+
...merged,
|
|
1797
1802
|
// Custom merge values
|
|
1798
1803
|
transformManifest,
|
|
1799
1804
|
imports,
|
|
@@ -1916,8 +1921,10 @@ var COMMAND_MODES = {
|
|
|
1916
1921
|
build: "production",
|
|
1917
1922
|
serve: "development"
|
|
1918
1923
|
};
|
|
1919
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
1920
|
-
const vite = await import("vite").catch(() =>
|
|
1924
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
1925
|
+
const vite = await import("vite").catch((err) => {
|
|
1926
|
+
logger.debug("Failed to import vite:", err);
|
|
1927
|
+
});
|
|
1921
1928
|
if (vite) {
|
|
1922
1929
|
return {
|
|
1923
1930
|
vite: async (env) => {
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
CHANGED
|
@@ -2276,7 +2276,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
2276
2276
|
}
|
|
2277
2277
|
devServerConfig = {
|
|
2278
2278
|
port,
|
|
2279
|
-
hostname: "localhost"
|
|
2279
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
2280
2280
|
};
|
|
2281
2281
|
}
|
|
2282
2282
|
const userModules = await resolveWxtUserModules(
|
|
@@ -2351,9 +2351,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
2351
2351
|
userConfig.transformManifest?.(manifest2);
|
|
2352
2352
|
inlineConfig.transformManifest?.(manifest2);
|
|
2353
2353
|
};
|
|
2354
|
-
const
|
|
2354
|
+
const merged = defu(inlineConfig, userConfig);
|
|
2355
|
+
const builderConfig = await mergeBuilderConfig(
|
|
2356
|
+
merged.logger ?? consola,
|
|
2357
|
+
inlineConfig,
|
|
2358
|
+
userConfig
|
|
2359
|
+
);
|
|
2355
2360
|
return {
|
|
2356
|
-
...
|
|
2361
|
+
...merged,
|
|
2357
2362
|
// Custom merge values
|
|
2358
2363
|
transformManifest,
|
|
2359
2364
|
imports,
|
|
@@ -2476,8 +2481,10 @@ var COMMAND_MODES = {
|
|
|
2476
2481
|
build: "production",
|
|
2477
2482
|
serve: "development"
|
|
2478
2483
|
};
|
|
2479
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
2480
|
-
const vite2 = await import("vite").catch(() =>
|
|
2484
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
2485
|
+
const vite2 = await import("vite").catch((err) => {
|
|
2486
|
+
logger.debug("Failed to import vite:", err);
|
|
2487
|
+
});
|
|
2481
2488
|
if (vite2) {
|
|
2482
2489
|
return {
|
|
2483
2490
|
vite: async (env) => {
|
|
@@ -2782,7 +2789,7 @@ function getChunkSortWeight(filename) {
|
|
|
2782
2789
|
import pc4 from "picocolors";
|
|
2783
2790
|
|
|
2784
2791
|
// package.json
|
|
2785
|
-
var version = "0.18.
|
|
2792
|
+
var version = "0.18.12";
|
|
2786
2793
|
|
|
2787
2794
|
// src/core/utils/log/printHeader.ts
|
|
2788
2795
|
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
|
@@ -12457,7 +12457,7 @@ async function resolveConfig(inlineConfig, command) {
|
|
|
12457
12457
|
}
|
|
12458
12458
|
devServerConfig = {
|
|
12459
12459
|
port,
|
|
12460
|
-
hostname: "localhost"
|
|
12460
|
+
hostname: mergedConfig.dev?.server?.hostname ?? "localhost"
|
|
12461
12461
|
};
|
|
12462
12462
|
}
|
|
12463
12463
|
const userModules = await resolveWxtUserModules(
|
|
@@ -12532,9 +12532,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
|
|
|
12532
12532
|
userConfig.transformManifest?.(manifest2);
|
|
12533
12533
|
inlineConfig.transformManifest?.(manifest2);
|
|
12534
12534
|
};
|
|
12535
|
-
const
|
|
12535
|
+
const merged = (0, import_defu.default)(inlineConfig, userConfig);
|
|
12536
|
+
const builderConfig = await mergeBuilderConfig(
|
|
12537
|
+
merged.logger ?? consola,
|
|
12538
|
+
inlineConfig,
|
|
12539
|
+
userConfig
|
|
12540
|
+
);
|
|
12536
12541
|
return {
|
|
12537
|
-
...
|
|
12542
|
+
...merged,
|
|
12538
12543
|
// Custom merge values
|
|
12539
12544
|
transformManifest,
|
|
12540
12545
|
imports,
|
|
@@ -12657,8 +12662,10 @@ var COMMAND_MODES = {
|
|
|
12657
12662
|
build: "production",
|
|
12658
12663
|
serve: "development"
|
|
12659
12664
|
};
|
|
12660
|
-
async function mergeBuilderConfig(inlineConfig, userConfig) {
|
|
12661
|
-
const vite2 = await import("vite").catch(() =>
|
|
12665
|
+
async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
12666
|
+
const vite2 = await import("vite").catch((err) => {
|
|
12667
|
+
logger.debug("Failed to import vite:", err);
|
|
12668
|
+
});
|
|
12662
12669
|
if (vite2) {
|
|
12663
12670
|
return {
|
|
12664
12671
|
vite: async (env2) => {
|
|
@@ -12964,7 +12971,7 @@ function getChunkSortWeight(filename) {
|
|
|
12964
12971
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
12965
12972
|
|
|
12966
12973
|
// package.json
|
|
12967
|
-
var version = "0.18.
|
|
12974
|
+
var version = "0.18.12";
|
|
12968
12975
|
|
|
12969
12976
|
// src/core/utils/building/internal-build.ts
|
|
12970
12977
|
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.12";
|
|
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.12";
|
|
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