File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ export function resolveTemplateCompilerOptions(
131
131
let transformAssetUrls = options . template ?. transformAssetUrls
132
132
// compiler-sfc should export `AssetURLOptions`
133
133
let assetUrlOptions //: AssetURLOptions | undefined
134
- if ( options . devServer ) {
134
+ if ( transformAssetUrls === false ) {
135
+ // if explicitly disabled, let assetUrlOptions be undefined
136
+ } else if ( options . devServer ) {
135
137
// during dev, inject vite base so that compiler-sfc can transform
136
138
// relative paths directly to absolute paths without incurring an extra import
137
139
// request
@@ -145,7 +147,7 @@ export function resolveTemplateCompilerOptions(
145
147
includeAbsolute : ! ! devBase ,
146
148
}
147
149
}
148
- } else if ( transformAssetUrls !== false ) {
150
+ } else {
149
151
// build: force all asset urls into import requests so that they go through
150
152
// the assets plugin for asset registration
151
153
assetUrlOptions = {
You can’t perform that action at this time.
0 commit comments