0.0.9 • Published 2 years ago

browser-reload-error-overlay-wepback-plugin v0.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

browser-reload-error-overlay-wepback-plugin

this is Webpack compiles the refresh plug-in and compile error logging plug-in,I found a lot of plugins on Github,error-overlay-wepback-plugin Both rely on React and are not very good for decoupling, so I wrote my own plugin to configure error-overlay and Browser-reload separately

The installation

 yarn add  browser-reload-error-overlay-wepback-plugin
 or
 npm i --save browser-reload-error-overlay-wepback-plugin
 or

Use the code

webpack.config.js

const BrowserReloadErrorOverlayWepbackPlugin = require("browser-reload-error-overlay-wepback-plugin");

 plugins: [
         // ...
        new BrowserReloadErrorOverlayWepbackPlugin(
         /*options*/
        ),
     // ...
    ]

options parameter

options keydefault Valueinstructions
port8080Sckoet port
retryWait5000Sckoet reconnection time
delay0Post-compile delay refresh time (ms)
compilerWatch()=>{}webpack Compile the callback function

Compile the log picture of the error

The author:yao guan shou (姚观寿)