Skip to content

Instantly share code, notes, and snippets.

Avatar

Martin Snajdr martin-snajdr

View GitHub Profile
@martin-snajdr
martin-snajdr / start.js (shortened)
Last active Sep 5, 2020
Adding HTTP Basic Auth to WebpackDevServer
View start.js (shortened)
// around line 25...
var config = require('../config/webpack.config.dev');
var paths = require('../config/paths');
var auth = require('basic-auth');
//...
function runDevServer(host, port, protocol) {
var devServer = new WebpackDevServer(compiler, {
//around line 265...
host: host,
You can’t perform that action at this time.