rollup-plugin-img
Advanced tools
Comparing version 1.0.6 to 1.1.0
@@ -147,3 +147,3 @@ 'use strict'; | ||
fs.createReadStream(id).pipe(fs.createWriteStream(outputFile)); | ||
return ("export default \"" + (outputFile.slice(baseIndex)) + "\""); | ||
return ("export default \"" + (opt._slash ? './' : '') + (outputFile.slice(baseIndex)) + "\""); | ||
} | ||
@@ -150,0 +150,0 @@ } |
@@ -142,3 +142,3 @@ import fs, { createReadStream, createWriteStream, existsSync, mkdirSync, readFileSync, statSync } from 'fs'; | ||
createReadStream(id).pipe(createWriteStream(outputFile)); | ||
return ("export default \"" + (outputFile.slice(baseIndex)) + "\""); | ||
return ("export default \"" + (opt._slash ? './' : '') + (outputFile.slice(baseIndex)) + "\""); | ||
} | ||
@@ -145,0 +145,0 @@ } |
{ | ||
"name": "rollup-plugin-img", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"description": "import image files with rollup", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -52,2 +52,3 @@ # rollup-plugin-img | ||
- limit: Optional. the limit(byte) of the file size. A file will be transformed into base64 string when it doesn't exceeded the limit, otherwise, it will be copyed to the dest path. | ||
- hash: Optional. a boolean value to indicate wheather to generate a hash string in file name(default false). | ||
@@ -54,0 +55,0 @@ demo: |
@@ -49,3 +49,3 @@ import { statSync, readFileSync, createReadStream, createWriteStream, existsSync, mkdirSync } from 'fs'; | ||
createReadStream(id).pipe(createWriteStream(outputFile)); | ||
return `export default "${outputFile.slice(baseIndex)}"`; | ||
return `export default "${opt._slash ? './' : ''}${outputFile.slice(baseIndex)}"`; | ||
} | ||
@@ -52,0 +52,0 @@ } |
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
14032
71