around-build-webpack-plugin

Around webpack build.

Usage no npm install needed!

<script type="module">
  import aroundBuildWebpackPlugin from 'https://cdn.skypack.dev/around-build-webpack-plugin';
</script>

README

around-build-webpack-plugin

Install

npm i --save-dev around-build-webpack-plugin

Usage

pre-build steps and post-build steps will be executed sequentially .

webpack.config.js

const { PreBuildPlugin, PostBuildPlugin } = require('around-build-webpack-plugin');

module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new PreBuildPlugin(
      async function PreBuildStep1 () { },
      async function PreBuildStep2 () { }
    ),
    new PostBuildPlugin(
      async function PreBuildStep2 () { }
      async function PreBuildStep2 () { }
    )
  ]
}

License

MIT.