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