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

Webpack plugin that creates a map of assets to public url slug for server agnostic usage.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-88.89%
Maintainers
1
Weekly downloads
 
Created
Source

Webpack Asset Map Plugin

Creates a json file that any server side technology can consume for asset declarations. Example output file:

{
    "./images/favicon.png": "/assets/8f6f13d598e912ac61d3bc88b248ec8e.png",
    "./images/javascript.png": "/assets/32e1e05a1be1599842f488647e1d04f0.png"
}

The key is the relative path from the generated file to the image location in your source location. The value is the public url slug generated by webpack.

Usage

Add to the plugins array in your webpack config:

var AssetMapPlugin = require('asset-map-webpack-plugin');

module.exports = {
  ...
  plugins: [
    new AssetMapPlugin(publicPath, outputFilename)
  ]
};

Keywords

FAQs

Package last updated on 24 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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