svelte-preprocess-import-assets
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -5,2 +5,8 @@ # Changelog | ||
### Added | ||
- Add `http` option | ||
## 0.1.0 - 2021-05-01 | ||
Initial release |
@@ -6,2 +6,3 @@ import { PreprocessorGroup } from 'svelte/types/compiler/preprocess'; | ||
importPrefix?: string; | ||
http?: boolean; | ||
urlFilter?: (url: string) => boolean; | ||
@@ -8,0 +9,0 @@ } |
@@ -8,2 +8,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/index.ts | ||
importPrefix = DEFAULT_ASSET_PREFIX, | ||
http = false, | ||
urlFilter | ||
@@ -21,2 +22,4 @@ } = options; | ||
const url = attributeValue.raw.trim(); | ||
if (!http && /^https?:\/\//.test(url)) | ||
return; | ||
if (urlFilter && !urlFilter(url)) | ||
@@ -23,0 +26,0 @@ return; |
{ | ||
"name": "svelte-preprocess-import-assets", | ||
"description": "Import assets in markup", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Bjorn Lu", |
@@ -92,2 +92,9 @@ # svelte-preprocess-import-assets | ||
### http | ||
- **Type:** `boolean` | ||
- **Default:** `false` | ||
Whether a URL with http/https protocol should be converted to an import. | ||
### urlFilter | ||
@@ -94,0 +101,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18840
508
128