@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.
@@ -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`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "2.7.0-beta.1",
3
+ "version": "2.7.0-beta.2",
4
4
  "description": "compiler-sfc for Vue 2",
5
5
  "main": "dist/compiler-sfc.js",
6
6
  "types": "dist/compiler-sfc.d.ts",