Skip to content

axelboberg/webpack-asset-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-asset-map

A small Webpack-plugin for creating a JSON-file containing the name of bundled assets

Usage

const AssetMap = require('webpack-asset-map')
 
module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new AssetMap(options)
  ]
}

Options

options.filename?

Type: String
Default: assets.json

options.path?

Type: String
Default: The output-path specified in webpack.config.js

The relative path from webpack.config.js to the directory where the JSON-file will be created. Will overwrite if the file already exists.

options.data?

Type: Object
Default: An empty object

Additional data to be written to the file, can be used to overwrite existing values

About

A small Webpack-plugin without dependencies to write the name of bundled assets to a JSON-file

Resources

License

Stars

Watchers

Forks

Packages

No packages published