Skip to content

Commit

Permalink
fix(faster): fix error message typo + add color (#10614)
Browse files Browse the repository at this point in the history
fix faster error
  • Loading branch information
slorber authored Oct 25, 2024
1 parent 3c8dc5b commit 87c1965
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/docusaurus-bundler/src/importFaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -22,7 +23,9 @@ async function ensureFaster(): Promise<FasterModule> {
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},
);
}
Expand Down

0 comments on commit 87c1965

Please sign in to comment.