recma-import-images
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -26,4 +26,6 @@ import { visit } from 'estree-util-visit' | ||
if (!srcProp?.value.value) return | ||
let name = `${slugify(srcProp.value.value).replace(/-/g, '_')}$recmaImportImages` | ||
images[srcProp.value.value] = name | ||
let path = srcProp.value.value | ||
let name = | ||
images[path] ?? `${slugify(srcProp.value.value).replace(/-/g, '_')}$recmaImportImages` | ||
images[path] = name | ||
srcProp.value = { type: 'Identifier', name } | ||
@@ -30,0 +32,0 @@ }) |
{ | ||
"name": "recma-import-images", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "recma plugin to import image sources", | ||
@@ -5,0 +5,0 @@ "author": "Brad Cornes", |
2990
41