svelte-preprocess-import-assets
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -164,3 +164,5 @@ var __create = Object.create; | ||
} = options; | ||
let hasCustomSources = false; | ||
if (typeof sources === "function") { | ||
hasCustomSources = true; | ||
sources = sources(DEFAULT_SOURCES); | ||
@@ -198,3 +200,3 @@ } | ||
} | ||
} else if (node.type === "Element") { | ||
} else if (node.type === "Element" || hasCustomSources && node.type === "InlineComponent") { | ||
let getAttributes = function() { | ||
@@ -201,0 +203,0 @@ if (!lazyAttributes) { |
{ | ||
"name": "svelte-preprocess-import-assets", | ||
"description": "Import assets in markup", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Bjorn Lu", |
@@ -73,3 +73,3 @@ # svelte-preprocess-import-assets | ||
These are the sources to look for when scanning for imports. You can provide an entirely different list of sources, or declare a function to access the default sources and augment it. The supported tags and attributes are based on [html-loader](https://github.com/webpack-contrib/html-loader#sources) (except `icon-uri`). | ||
These are the sources to look for when scanning for imports. You can provide an entirely different list of sources, or declare a function to access the default sources and augment it. The supported tags and attributes are based on [html-loader](https://github.com/webpack-contrib/html-loader#sources) (except `icon-uri`). Component name as `tag` is also supported. | ||
@@ -132,4 +132,12 @@ ```js | ||
## Sponsors | ||
<p align="center"> | ||
<a href="https://bjornlu.com/sponsors.svg"> | ||
<img src="https://bjornlu.com/sponsors.svg" alt="Sponsors" /> | ||
</a> | ||
</p> | ||
## License | ||
MIT |
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
21938
548
142