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.6 to 1.1.0

2

dist/index.cjs.js

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

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