mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
fix(v2): fix multi-instance mdx loaders not sandboxed correctly (#3970)
* another attempt to fix the multi-instance conflicts * try to fix windows build * cleanup + improve comment
This commit is contained in:
parent
9fdac1a0dc
commit
1e1860681b
4 changed files with 15 additions and 3 deletions
|
@ -17,6 +17,7 @@ import {
|
|||
aliasedSitePath,
|
||||
reportMessage,
|
||||
posixPath,
|
||||
addTrailingPathSeparator,
|
||||
} from '@docusaurus/utils';
|
||||
import {LoadContext, Plugin, RouteConfig} from '@docusaurus/types';
|
||||
|
||||
|
@ -345,7 +346,9 @@ export default function pluginContentDocs(
|
|||
function createMDXLoaderRule(): RuleSetRule {
|
||||
return {
|
||||
test: /(\.mdx?)$/,
|
||||
include: flatten(versionsMetadata.map(getDocsDirPaths)),
|
||||
include: flatten(versionsMetadata.map(getDocsDirPaths))
|
||||
// Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
|
||||
.map(addTrailingPathSeparator),
|
||||
use: compact([
|
||||
getCacheLoader(isServer),
|
||||
getBabelLoader(isServer),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue