From 315912ebf3b9efd1fd61f4939ffdec34065fdcdd Mon Sep 17 00:00:00 2001 From: Aaron Date: Tue, 28 Jul 2026 17:10:12 -0500 Subject: [PATCH] chore(deps): Drop `import-meta-resolve` (#2526) --- bun.lock | 1 - packages/wxt/package.json | 1 - packages/wxt/src/core/resolve-config.ts | 10 ++-------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/bun.lock b/bun.lock index e59cf926..3dbddaf7 100644 --- a/bun.lock +++ b/bun.lock @@ -311,7 +311,6 @@ "get-port-please": "^3.2.0", "giget": "^1.2.3 || ^2.0.0 || ^3.0.0", "hookable": "^6.1.0", - "import-meta-resolve": "^4.2.0", "is-wsl": "^3.1.1", "json5": "^2.2.3", "jszip": "^3.10.1", diff --git a/packages/wxt/package.json b/packages/wxt/package.json index bbb69f96..cefe9a32 100644 --- a/packages/wxt/package.json +++ b/packages/wxt/package.json @@ -34,7 +34,6 @@ "get-port-please": "^3.2.0", "giget": "^1.2.3 || ^2.0.0 || ^3.0.0", "hookable": "^6.1.0", - "import-meta-resolve": "^4.2.0", "is-wsl": "^3.1.1", "json5": "^2.2.3", "jszip": "^3.10.1", diff --git a/packages/wxt/src/core/resolve-config.ts b/packages/wxt/src/core/resolve-config.ts index edf829b8..df06b4b0 100644 --- a/packages/wxt/src/core/resolve-config.ts +++ b/packages/wxt/src/core/resolve-config.ts @@ -1,5 +1,4 @@ import { loadConfig } from 'c12'; -import { resolve as esmResolve } from 'import-meta-resolve'; import { ConfigEnv, InlineConfig, @@ -546,10 +545,7 @@ async function getUnimportEslintOptions( /** Returns the path to `node_modules/wxt`. */ function resolveWxtModuleDir() { - // TODO: Switch to import.meta.resolve() once the parent argument is unflagged - // (e.g. --experimental-import-meta-resolve) and all Node.js versions we support - // have it. - const url = esmResolve('wxt', import.meta.url); + const url = import.meta.resolve('wxt', import.meta.url); // esmResolve() returns the "wxt/dist/index.mjs" file, not the package's root // directory, which we want to return from this function. @@ -605,9 +601,7 @@ export async function resolveWxtUserModules( // Resolve node_modules modules const npmModules = await Promise.all>( modules.map(async (moduleId) => { - // Resolve before importing to allow for a local WXT clone to be - // symlinked into a project. - const resolvedModulePath = esmResolve(moduleId, importer); + const resolvedModulePath = import.meta.resolve(moduleId, importer); const mod: { default: WxtModule } = await import( /* @vite-ignore */ resolvedModulePath );