@vue/compiler-sfc 2.7.0-beta.1 → 2.7.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler-sfc.js +11 -0
- package/package.json +1 -1
package/dist/compiler-sfc.js
CHANGED
|
@@ -9399,6 +9399,9 @@ function urlToRequire(url, transformAssetUrlsOption = {}) {
|
|
|
9399
9399
|
const secondChar = url.charAt(1);
|
|
9400
9400
|
url = url.slice(secondChar === '/' ? 2 : 1);
|
|
9401
9401
|
}
|
|
9402
|
+
if (isExternalUrl(url) || isDataUrl(url) || firstChar === '#') {
|
|
9403
|
+
return returnValue;
|
|
9404
|
+
}
|
|
9402
9405
|
const uriParts = parseUriParts(url);
|
|
9403
9406
|
if (transformAssetUrlsOption.base) {
|
|
9404
9407
|
// explicit base - directly rewrite the url into absolute url
|
|
@@ -9444,6 +9447,14 @@ function parseUriParts(urlString) {
|
|
|
9444
9447
|
}
|
|
9445
9448
|
}
|
|
9446
9449
|
return returnValue;
|
|
9450
|
+
}
|
|
9451
|
+
const externalRE = /^(https?:)?\/\//;
|
|
9452
|
+
function isExternalUrl(url) {
|
|
9453
|
+
return externalRE.test(url);
|
|
9454
|
+
}
|
|
9455
|
+
const dataUrlRE = /^\s*data:/i;
|
|
9456
|
+
function isDataUrl(url) {
|
|
9457
|
+
return dataUrlRE.test(url);
|
|
9447
9458
|
}
|
|
9448
9459
|
|
|
9449
9460
|
// vue compiler module for transforming `<tag>:<attribute>` to `require`
|