mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-22 12:37:58 +02:00
refactor: remove unnecessary default values normalized during validation (#6864)
* refactor: remove unnecessary default values normalized during validation * more
This commit is contained in:
parent
7fc134ba0e
commit
8e934450d8
27 changed files with 146 additions and 138 deletions
|
@ -114,7 +114,7 @@ export default async function mdxLoader(
|
|||
): Promise<void> {
|
||||
const callback = this.async();
|
||||
const filePath = this.resourcePath;
|
||||
const reqOptions = this.getOptions() || {};
|
||||
const reqOptions = this.getOptions() ?? {};
|
||||
|
||||
const {frontMatter, content: contentWithTitle} = parseFrontMatter(fileString);
|
||||
|
||||
|
@ -127,7 +127,7 @@ export default async function mdxLoader(
|
|||
const options: Options = {
|
||||
...reqOptions,
|
||||
remarkPlugins: [
|
||||
...(reqOptions.beforeDefaultRemarkPlugins || []),
|
||||
...(reqOptions.beforeDefaultRemarkPlugins ?? []),
|
||||
...DEFAULT_OPTIONS.remarkPlugins,
|
||||
[
|
||||
transformImage,
|
||||
|
@ -143,12 +143,12 @@ export default async function mdxLoader(
|
|||
siteDir: reqOptions.siteDir,
|
||||
},
|
||||
],
|
||||
...(reqOptions.remarkPlugins || []),
|
||||
...(reqOptions.remarkPlugins ?? []),
|
||||
],
|
||||
rehypePlugins: [
|
||||
...(reqOptions.beforeDefaultRehypePlugins || []),
|
||||
...(reqOptions.beforeDefaultRehypePlugins ?? []),
|
||||
...DEFAULT_OPTIONS.rehypePlugins,
|
||||
...(reqOptions.rehypePlugins || []),
|
||||
...(reqOptions.rehypePlugins ?? []),
|
||||
],
|
||||
filepath: filePath,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue