From ca29feaecf0d9bf27c3d037e4589b4a6d33c65d2 Mon Sep 17 00:00:00 2001 From: rxliuli Date: Thu, 6 Jun 2024 10:24:58 +0800 Subject: [PATCH] fix: To fix the issue with Entrypoint Side Effects link errors (#705) --- packages/wxt/src/core/utils/building/import-entrypoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wxt/src/core/utils/building/import-entrypoint.ts b/packages/wxt/src/core/utils/building/import-entrypoint.ts index 0426a7f5..c215bffa 100644 --- a/packages/wxt/src/core/utils/building/import-entrypoint.ts +++ b/packages/wxt/src/core/utils/building/import-entrypoint.ts @@ -90,7 +90,7 @@ export async function importEntrypointFile(path: string): Promise { // "XXX is not defined" - usually due to WXT removing imports const variableName = err.message.replace(' is not defined', ''); throw Error( - `${filePath}: Cannot use imported variable "${variableName}" outside the main function. See https://wxt.dev/guide/entrypoints.html#side-effects`, + `${filePath}: Cannot use imported variable "${variableName}" outside the main function. See https://wxt.dev/guide/go-further/entrypoint-side-effects.html`, { cause: err }, ); } else {