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