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