mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-23 21:17:54 +02:00
fix(core): handle case where package.json is not available at CWD (#7187)
This commit is contained in:
parent
e12947e818
commit
3b32a41f22
6 changed files with 22 additions and 16 deletions
|
@ -16,6 +16,10 @@ export const NODE_MINOR_VERSION = parseInt(
|
|||
10,
|
||||
);
|
||||
|
||||
/** Docusaurus core version. */
|
||||
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
||||
export const DOCUSAURUS_VERSION = require('../package.json').version;
|
||||
|
||||
/**
|
||||
* Can be overridden with cli option `--out-dir`. Code should generally use
|
||||
* `context.outDir` instead (which is always absolute and localized).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue