Skip to content

noticeMaker/hash-webpack-export-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hash-Webpack-Export-Plugin

Plugin creation of json files to serve your bundles

Install

  npm i --save-dev hash-webpack-export-plugin

Usage

webpack.config.js

const HtmlWebpackPlugin = require('hash-webpack-export-plugin')

module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
      new HashExportPlugin({
          filename: 'your file name, default `version`',
          outPath: 'your out path, default `__dirname`'  
      })
  ]
}

This will generate a file version.json containing the following

version.json

    {
        "previous":"59362f9364ad0dcfce67",
        "current":"59362f9364ad0dcfce67"
    }

example

  npm run example

About

webpack hash plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published