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:
Sébastien Lorber 2020-12-30 11:18:51 +01:00 committed by GitHub
parent 9fdac1a0dc
commit 1e1860681b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View file

@ -15,6 +15,7 @@ import {
getPluginI18nPath,
reportMessage,
posixPath,
addTrailingPathSeparator,
} from '@docusaurus/utils';
import {
STATIC_DIR_NAME,
@ -436,7 +437,9 @@ export default function pluginContentBlog(
rules: [
{
test: /(\.mdx?)$/,
include: getContentPathList(contentPaths),
include: getContentPathList(contentPaths)
// Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
.map(addTrailingPathSeparator),
use: [
getCacheLoader(isServer),
getBabelLoader(isServer),