mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
feat(v2): enable user to analyze production bundle size (#1334)
* feat(v2): enable user to analyze bundle size with --bundle-analyzer for production * nits
This commit is contained in:
parent
5db02f41a9
commit
c129c68d1c
8 changed files with 79 additions and 19 deletions
|
@ -238,11 +238,9 @@ describe('loadDocs', () => {
|
|||
{
|
||||
path: '../docs',
|
||||
sidebarPath,
|
||||
skipNextRelease: true,
|
||||
},
|
||||
{
|
||||
cliOptions: {
|
||||
skipNextRelease: true,
|
||||
},
|
||||
env,
|
||||
siteDir,
|
||||
siteConfig,
|
||||
|
|
|
@ -25,6 +25,7 @@ const DEFAULT_OPTIONS = {
|
|||
// TODO: Settle themeing.
|
||||
docLayoutComponent: '@theme/Doc',
|
||||
docItemComponent: '@theme/DocBody',
|
||||
skipNextRelease: false, // Skip documents from next release (default = false)
|
||||
};
|
||||
|
||||
class DocusaurusPluginContentDocs {
|
||||
|
@ -44,9 +45,8 @@ class DocusaurusPluginContentDocs {
|
|||
|
||||
// Fetches blog contents and returns metadata for the contents.
|
||||
async loadContent() {
|
||||
const {include, routeBasePath, sidebarPath} = this.options;
|
||||
const {siteDir, env, siteConfig, cliOptions = {}} = this.context;
|
||||
const {skipNextRelease} = cliOptions;
|
||||
const {include, routeBasePath, sidebarPath, skipNextRelease} = this.options;
|
||||
const {siteDir, env, siteConfig} = this.context;
|
||||
const docsDir = this.contentPath;
|
||||
|
||||
// We don't want sidebars to be cached because of hotreloading.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue