refactor(v2): remove duplicated lodash dependencies and import only what needed (#4361)

Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
Armano 2021-03-09 12:15:52 +01:00 committed by GitHub
parent bac512bc63
commit e6261af642
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 22 additions and 142 deletions

View file

@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/
import flatMap from 'lodash.flatmap';
import fs from 'fs-extra';
import importFresh from 'import-fresh';
import {
@ -18,7 +17,7 @@ import {
SidebarItemCategory,
SidebarItemType,
} from './types';
import {mapValues, flatten, difference} from 'lodash';
import {mapValues, flatten, flatMap, difference} from 'lodash';
import {getElementsAround} from '@docusaurus/utils';
type SidebarItemCategoryJSON = SidebarItemBase & {