Skip to content

Commit cb80a9e

Browse files
committed
chore: fix params
1 parent 3bb73dc commit cb80a9e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/bundler-vite/src/plugins/vuepressMarkdownPlugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ export const vuepressMarkdownPlugin = ({ app }: { app: App }): Plugin => ({
1818

1919
// if the page content is not changed, render it to vue component directly
2020
if (page?.content === code) {
21-
return renderPageToVue(page)
21+
return renderPageToVue(app, page)
2222
}
2323

2424
// create a new page with the new content
2525
const newPage = await createPage(app, {
2626
content: code,
2727
filePath: id,
2828
})
29-
return renderPageToVue(newPage)
29+
return renderPageToVue(app, newPage)
3030
},
3131

3232
async handleHotUpdate(ctx) {
@@ -41,6 +41,6 @@ export const vuepressMarkdownPlugin = ({ app }: { app: App }): Plugin => ({
4141
filePath: ctx.file,
4242
})
4343

44-
ctx.read = () => renderPageToVue(newPage)
44+
ctx.read = () => renderPageToVue(app, newPage)
4545
},
4646
})

packages/bundler-webpack/src/loaders/vuepressMarkdownLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ export const vuepressMarkdownLoader: LoaderDefinitionFunction<VuepressMarkdownLo
2121

2222
// if the page content is not changed, render it to vue component directly
2323
if (page?.content === source) {
24-
return renderPageToVue(page)
24+
return renderPageToVue(app, page)
2525
}
2626

2727
// create a new page with the new content
2828
const newPage = await createPage(app, {
2929
content: source,
3030
filePath: this.resourcePath,
3131
})
32-
return renderPageToVue(newPage)
32+
return renderPageToVue(app, newPage)
3333
}

packages/core/src/app/prepare/preparePageChunk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import type { App, Page } from '../../types/index.js'
66
*/
77
export const preparePageChunk = async (app: App, page: Page): Promise<void> => {
88
if (page.filePath === null) {
9-
await app.writeTemp(page.chunkFilePathRelative, renderPageToVue(page))
9+
await app.writeTemp(page.chunkFilePathRelative, renderPageToVue(app, page))
1010
}
1111
}

0 commit comments

Comments
 (0)