0.0.5 • Published 5 years ago

jsonify-webpack-plugin v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Build Status Lint Status codecov

  npm i -D jsonify-webpack-plugin

webpack.config.js

const JsonifyWebpackConfig = require('jsonify-webpack-plugin')
const path = require('path')

module.exports = {
  entry: 'index.js',
  output: {
    path: path.resolve(__dirname + 'dist'),
    filename: 'bundle.js'
  },
  plugins: [new JsonifyWebpackPlugin(['bundle.js'])]
}

This will generate a file dist/index.json containing the following

{
  "bundle.js": "/******/ (function(modules) {..."
}