mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 10:48:05 +02:00
fix(faster): fix error message typo + add color (#10614)
fix faster error
This commit is contained in:
parent
3c8dc5bc15
commit
87c19650ba
1 changed files with 4 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
import type {
|
import type {
|
||||||
MinimizerOptions as JsMinimizerOptions,
|
MinimizerOptions as JsMinimizerOptions,
|
||||||
CustomOptions,
|
CustomOptions,
|
||||||
|
@ -22,7 +23,9 @@ async function ensureFaster(): Promise<FasterModule> {
|
||||||
return await importFaster();
|
return await importFaster();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new 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},
|
{cause: error},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue