File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/gatsby-plugin-mdx/utils Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ const _ = require(`lodash`)
3
3
const debug = require ( `debug` ) ( `get-source-plugins-as-remark-plugins` )
4
4
const { interopDefault } = require ( `./interop-default` )
5
5
6
- let fileNodes
7
-
8
6
// ensure only one `/` in new url
9
7
const withPathPrefix = ( url , pathPrefix ) =>
10
8
( pathPrefix + url ) . replace ( / \/ \/ / , `/` )
@@ -39,8 +37,6 @@ module.exports = async function getSourcePluginsAsRemarkPlugins({
39
37
}
40
38
}
41
39
42
- fileNodes = getNodesByType ( `File` )
43
-
44
40
// return list of remarkPlugins
45
41
const userPlugins = gatsbyRemarkPlugins
46
42
. filter ( plugin => {
@@ -62,7 +58,9 @@ module.exports = async function getSourcePluginsAsRemarkPlugins({
62
58
markdownNode : mdxNode ,
63
59
getNode,
64
60
getNodesByType,
65
- files : fileNodes ,
61
+ get files ( ) {
62
+ return getNodesByType ( `File` )
63
+ } ,
66
64
pathPrefix,
67
65
reporter,
68
66
cache,
You can’t perform that action at this time.
0 commit comments