fix: To fix the issue with Entrypoint Side Effects link errors (#705)

This commit is contained in:
rxliuli
2024-06-06 10:24:58 +08:00
committed by GitHub
parent f6420e5fdf
commit ca29feaecf
@@ -90,7 +90,7 @@ export async function importEntrypointFile<T>(path: string): Promise<T> {
// "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 {