File tree 2 files changed +10
-1
lines changed
packages/compiler-sfc/src/templateCompilerModules
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ export interface TransformAssetUrlsOptions {
13
13
* imports, they will be directly rewritten to absolute urls.
14
14
*/
15
15
base ?: string
16
+ /**
17
+ * If true, also processes absolute urls.
18
+ */
19
+ includeAbsolute ?: boolean
16
20
}
17
21
18
22
const defaultOptions : AssetURLOptions = {
Original file line number Diff line number Diff line change @@ -31,7 +31,12 @@ export function urlToRequire(
31
31
return returnValue
32
32
}
33
33
34
- if ( firstChar === '.' || firstChar === '~' || firstChar === '@' ) {
34
+ if (
35
+ transformAssetUrlsOption . includeAbsolute ||
36
+ firstChar === '.' ||
37
+ firstChar === '~' ||
38
+ firstChar === '@'
39
+ ) {
35
40
if ( ! uriParts . hash ) {
36
41
return `require("${ url } ")`
37
42
} else {
You can’t perform that action at this time.
0 commit comments