From 87c19650ba1d75228a3207af9a74c99959898d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 25 Oct 2024 13:22:51 +0200 Subject: [PATCH] fix(faster): fix error message typo + add color (#10614) fix faster error --- packages/docusaurus-bundler/src/importFaster.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus-bundler/src/importFaster.ts b/packages/docusaurus-bundler/src/importFaster.ts index 6731777a3d90..df2f252e11a6 100644 --- a/packages/docusaurus-bundler/src/importFaster.ts +++ b/packages/docusaurus-bundler/src/importFaster.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import logger from '@docusaurus/logger'; import type { MinimizerOptions as JsMinimizerOptions, CustomOptions, @@ -22,7 +23,9 @@ async function ensureFaster(): Promise { return await importFaster(); } catch (error) { throw new Error( - 'Your Docusaurus site need to add the @docusaurus/faster package as a dependency.', + `To enable Docusaurus Faster options, your site must add the ${logger.name( + '@docusaurus/faster', + )} package as a dependency.`, {cause: error}, ); }