1.0.1 • Published 6 years ago

hash-webpack-export-plugin v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago
  npm i --save-dev hash-webpack-export-plugin

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"
    }
  npm run example