PPJS Webpack Plugin

Introduction

A webpack plugin which runs the ppjs protection on the input JavaScript file using the compiler done hook.

Note: The plugin has ppjs-cli as its peerDependency so you have to install the ppjs-cli package manually to make it work.

Usage

Import the plugin in your webpack.config.js and add it to the plugins array:

const PpjsWebpackPlugin = require('ppjs-webpack-plugin');

// --Other configuration

plugins: [
  // --Other plugins
  new PpjsWebpackPlugin({
    inputFile: 'lib/main.js',
    outputFile: 'lib/main.protected.js',
    configFile: 'ppjs.config.json',
    mapFile: 'lib/main.js.map'
  })
]

Configuration

The ppjs webpack plugin accepts the same configuration file as the ppjs-cli package. You can learn more about it in the ppjs-cli package's README.