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

asset-map-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-map-webpack-plugin - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

11

index.js

@@ -13,2 +13,3 @@ var fs = require('fs');

var requestShortener = new RequestShortener(path.dirname(this.outputFile));
var emitted = false;
var assets = stats.compilation.modules

@@ -18,7 +19,9 @@ .map(function(m) {

name: m.readableIdentifier(requestShortener),
assets: Object.keys(m.assets || {})
}
assets: Object.keys(m.assets || {}),
module: m
};
}).filter(function(m){
return m.assets.length > 0;
}).reduce(function(acc, m) {
emitted = emitted || m.assets[0].emitted;
acc[m.name] = path.join(this.publicPath, m.assets[0]);

@@ -28,3 +31,5 @@ return acc;

fs.writeFileSync(this.outputFile, JSON.stringify(assets));
if (emitted) {
fs.writeFileSync(this.outputFile, JSON.stringify(assets));
}
}.bind(this));

@@ -31,0 +36,0 @@ };

{
"name": "asset-map-webpack-plugin",
"version": "0.0.2",
"version": "0.0.3",
"description": "Webpack plugin that creates a map of assets to public url slug for server agnostic usage.",

@@ -5,0 +5,0 @@ "main": "index.js",

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