Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-vue): user defined transformAssetUrls ignored in production build #7171

Merged
merged 1 commit into from
May 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/plugin-vue/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function resolveTemplateCompilerOptions(
slash(path.relative(options.root, path.dirname(filename)))
}
}
} else {
} else if (transformAssetUrls !== false) {
Copy link
Member

Choose a reason for hiding this comment

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

If transformAssetUrls is false, should we disabled it if options.devServer is true too? I think we can skip most of the code around here for that case.

Copy link
Member

Choose a reason for hiding this comment

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

Let's check this in another PR, the current branch refers to an optimization that may still be good to have for dev. I think we can merge this PR for the moment.

// build: force all asset urls into import requests so that they go through
// the assets plugin for asset registration
assetUrlOptions = {
Expand Down