Skip to content

Conversation

pengzhanbo
Copy link
Member

@pengzhanbo pengzhanbo commented Jun 24, 2025

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Other

Description

export default {
  plugin: [replaceAssetsPlugin('https://cdn.com')]
}

source:

![](/images/foo.png)
<img src="/images/foo.png">

dist output:

<img src="https://cdn.com/images/foo.png">
<img src="https://cdn.com/images/foo.png">

@coveralls
Copy link

coveralls commented Jun 24, 2025

Pull Request Test Coverage Report for Build 15870603923

Details

  • 59 of 59 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.2%) to 62.729%

Totals Coverage Status
Change from base Build 15753780776: 1.2%
Covered Lines: 1479
Relevant Lines: 2153

💛 - Coveralls

@pengzhanbo pengzhanbo requested a review from Mister-Hope June 24, 2025 16:22
@Mister-Hope
Copy link
Member

Mister-Hope commented Jun 24, 2025

I think you should somehow mention this only works for files located in public folder, and add some ref to vuepress core docs about it.

Starting with / is not clear enough, as I am expecting noob users placing them under src folder directly and ask you why it's not working.

Copy link
Member

@Mister-Hope Mister-Hope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except some description in docs.

@pengzhanbo pengzhanbo requested a review from Mister-Hope June 25, 2025 07:58
@Mister-Hope Mister-Hope merged commit 67c65a8 into main Jun 25, 2025
39 of 41 checks passed
@Mister-Hope Mister-Hope deleted the plugin-replace-assets branch June 25, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants