Skip to content

Commit 9a6e677

Browse files
fix(core): update default value for absolutePathPrependBase (#1706)
Co-authored-by: Xinyu Liu <meteor.lxy@foxmail.com>
1 parent 1d80f63 commit 9a6e677

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎e2e/docs/.vuepress/config.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ export default defineUserConfig({
5555
},
5656
},
5757

58-
markdown: {
59-
assets: {
60-
absolutePathPrependBase: E2E_BUNDLER === 'webpack',
61-
},
62-
},
63-
6458
bundler:
6559
E2E_BUNDLER === 'webpack'
6660
? webpackBundler()

‎packages/core/src/app/resolveAppMarkdown.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ export const resolveAppMarkdown = async (app: App): Promise<Markdown> => {
1515
app,
1616
)
1717

18+
// some bundlers require prepending base to absolute paths
19+
if (app.options.markdown.assets !== false) {
20+
app.options.markdown.assets ??= {}
21+
app.options.markdown.assets.absolutePathPrependBase ??=
22+
app.options.bundler.name === '@vuepress/bundler-webpack'
23+
}
24+
1825
const markdown = createMarkdown(app.options.markdown)
1926

2027
// plugin hook: extendsMarkdown

0 commit comments

Comments
 (0)