Install the plugin
npm install compiler-then-plugin -D
Configure Webpack
const CompilerThenPlugin = require('compiler-then-plugin')
module.exports = {
plugins: [
new CompilerThenPlugin({
port: 3333,
script: 'console.log("something...")',
}),
],
}
Type: number
Default: 3872
Port number of the internal websocket service.
Type: string
Default: location.reload
Custom execute script, a JavaScript string.