rollup-plugin-img
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -28,3 +28,3 @@ 'use strict'; | ||
if (fs.statSync(id).size <= 8192) { // use base64 | ||
if (fs.statSync(id).size <= (opt.limit || 8192)) { // use base64 | ||
return ("export default \"data:" + (mimeMap[ext]) + ";base64," + (fs.readFileSync(id, 'base64')) + "\""); | ||
@@ -31,0 +31,0 @@ } else { //copy file to distPath |
@@ -26,3 +26,3 @@ import { createReadStream, createWriteStream, existsSync, mkdirSync, readFileSync, statSync } from 'fs'; | ||
if (statSync(id).size <= 8192) { // use base64 | ||
if (statSync(id).size <= (opt.limit || 8192)) { // use base64 | ||
return ("export default \"data:" + (mimeMap[ext]) + ";base64," + (readFileSync(id, 'base64')) + "\""); | ||
@@ -29,0 +29,0 @@ } else { //copy file to distPath |
{ | ||
"name": "rollup-plugin-img", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "import image files with rollup", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -26,3 +26,3 @@ import { statSync, readFileSync, createReadStream, createWriteStream, existsSync, mkdirSync } from 'fs'; | ||
if (statSync(id).size <= 8192) { // use base64 | ||
if (statSync(id).size <= (opt.limit || 8192)) { // use base64 | ||
return `export default "data:${mimeMap[ext]};base64,${readFileSync(id, 'base64')}"`; | ||
@@ -29,0 +29,0 @@ } else { //copy file to distPath |
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
6140