mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-22 12:37:58 +02:00
feat(core): support TypeScript + ESM configuration (#9317)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
336a44f3ea
commit
45f1a669b5
126 changed files with 2054 additions and 914 deletions
|
@ -17,7 +17,7 @@ import {
|
|||
readVersionsFile,
|
||||
} from './versions/files';
|
||||
import {validateVersionName} from './versions/validation';
|
||||
import {loadSidebarsFileUnsafe} from './sidebars';
|
||||
import {loadSidebarsFile} from './sidebars';
|
||||
import {CURRENT_VERSION_NAME} from './constants';
|
||||
import type {PluginOptions} from '@docusaurus/plugin-content-docs';
|
||||
import type {LoadContext} from '@docusaurus/types';
|
||||
|
@ -37,7 +37,7 @@ async function createVersionedSidebarFile({
|
|||
// Note: we don't need the sidebars file to be normalized: it's ok to let
|
||||
// plugin option changes to impact older, versioned sidebars
|
||||
// We don't validate here, assuming the user has already built the version
|
||||
const sidebars = await loadSidebarsFileUnsafe(sidebarPath);
|
||||
const sidebars = await loadSidebarsFile(sidebarPath);
|
||||
|
||||
// Do not create a useless versioned sidebars file if sidebars file is empty
|
||||
// or sidebars are disabled/false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue