fix(rocket-preset-extend-lion): run plugins in correct order, allowing replace functions to access local urls and kick in after tag transforms

This commit is contained in:
Thijs Louisse 2022-06-14 23:47:21 +02:00 committed by Thijs Louisse
parent facc094193
commit 2514fa972a
2 changed files with 14 additions and 9 deletions

View file

@ -0,0 +1,5 @@
---
'rocket-preset-extend-lion-docs': patch
---
fix: run plugins in correct order, allowing replace functions to access local urls and kick in after tag transforms

View file

@ -54,13 +54,6 @@ export async function extendLionDocs({
return { return {
path: path.resolve(__dirname), path: path.resolve(__dirname),
setupUnifiedPlugins: [ setupUnifiedPlugins: [
addPlugin(
remarkExtendPkg.remarkExtend,
{ globalReplaceFunction },
{
location: markdownPkg,
},
),
addPlugin( addPlugin(
remarkUrlToLocal, remarkUrlToLocal,
// the page object gets injected globally // the page object gets injected globally
@ -70,7 +63,7 @@ export async function extendLionDocs({
rootDir: _rootDir, rootDir: _rootDir,
}, },
{ {
location: remarkExtendPkg.remarkExtend, location: markdownPkg,
}, },
), ),
addPlugin( addPlugin(
@ -79,7 +72,14 @@ export async function extendLionDocs({
// @ts-ignore // @ts-ignore
{ extendDocsConfig }, { extendDocsConfig },
{ {
location: remarkExtendPkg.remarkExtend, location: remarkUrlToLocal,
},
),
addPlugin(
remarkExtendPkg.remarkExtend,
{ globalReplaceFunction },
{
location: remarkUrlToLocal,
}, },
), ),
], ],