Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-img

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-img - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

dist/index.cjs.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc