File tree Expand file tree Collapse file tree 5 files changed +5
-9
lines changed
docusaurus-plugin-content-blog/src
docusaurus-plugin-content-docs/src
docusaurus-plugin-content-pages/src
docusaurus/src/server/plugins
website/src/plugins/changelog Expand file tree Collapse file tree 5 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ export default async function pluginContentBlog(
359
359
return translateContent ( content , translationFiles ) ;
360
360
} ,
361
361
362
- configureWebpack ( _config , isServer , { getJSLoader } , content ) {
362
+ configureWebpack ( _config , isServer , utils , content ) {
363
363
const {
364
364
admonitions,
365
365
rehypePlugins,
@@ -399,7 +399,6 @@ export default async function pluginContentBlog(
399
399
// Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
400
400
. map ( addTrailingPathSeparator ) ,
401
401
use : [
402
- getJSLoader ( { isServer} ) ,
403
402
{
404
403
loader : require . resolve ( '@docusaurus/mdx-loader' ) ,
405
404
options : {
Original file line number Diff line number Diff line change @@ -228,7 +228,6 @@ export default async function pluginContentDocs(
228
228
} ,
229
229
230
230
configureWebpack ( _config , isServer , utils , content ) {
231
- const { getJSLoader} = utils ;
232
231
const {
233
232
rehypePlugins,
234
233
remarkPlugins,
@@ -263,7 +262,6 @@ export default async function pluginContentDocs(
263
262
test : / \. m d x ? $ / i,
264
263
include : contentDirs ,
265
264
use : [
266
- getJSLoader ( { isServer} ) ,
267
265
{
268
266
loader : require . resolve ( '@docusaurus/mdx-loader' ) ,
269
267
options : {
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export default function pluginContentPages(
186
186
) ;
187
187
} ,
188
188
189
- configureWebpack ( config , isServer , { getJSLoader } ) {
189
+ configureWebpack ( ) {
190
190
const {
191
191
admonitions,
192
192
rehypePlugins,
@@ -209,7 +209,6 @@ export default function pluginContentPages(
209
209
// Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
210
210
. map ( addTrailingPathSeparator ) ,
211
211
use : [
212
- getJSLoader ( { isServer} ) ,
213
212
{
214
213
loader : require . resolve ( '@docusaurus/mdx-loader' ) ,
215
214
options : {
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export function createMDXFallbackPlugin({
85
85
version : { type : 'synthetic' } ,
86
86
// Synthetic, the path doesn't matter much
87
87
path : '.' ,
88
- configureWebpack ( config , isServer , { getJSLoader } ) {
88
+ configureWebpack ( config ) {
89
89
// We need the mdx fallback loader to exclude files that were already
90
90
// processed by content plugins mdx loaders. This works, but a bit
91
91
// hacky... Not sure there's a way to handle that differently in webpack
@@ -117,7 +117,6 @@ export function createMDXFallbackPlugin({
117
117
test : / \. m d x ? $ / i,
118
118
exclude : getMDXFallbackExcludedPaths ( ) ,
119
119
use : [
120
- getJSLoader ( { isServer} ) ,
121
120
{
122
121
loader : require . resolve ( '@docusaurus/mdx-loader' ) ,
123
122
options : mdxLoaderOptions ,
Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ async function ChangelogPlugin(context, options) {
138
138
'default' ,
139
139
) ;
140
140
// Redirect the metadata path to our folder
141
- config . module . rules [ 0 ] . use [ 1 ] . options . metadataPath = ( mdxPath ) => {
141
+ const mdxLoader = config . module . rules [ 0 ] . use [ 0 ] ;
142
+ mdxLoader . options . metadataPath = ( mdxPath ) => {
142
143
// Note that metadataPath must be the same/in-sync as
143
144
// the path from createData for each MDX.
144
145
const aliasedPath = aliasedSitePath ( mdxPath , context . siteDir ) ;
You can’t perform that action at this time.
0 commit comments