View Full Version : How to turn off automatically open browser after webpack-dev-server starts ?

21 Oct 2019, 9:58 AM
I am using ExtAngular 7, and I want to not automatically open browser tab whenever I start my local server.
In webpack.config.js, I tried to set open: false for devServer block:

devServer: {
contentBase: outputFolder,
historyApiFallback: true,
hot: !isProd,
host: '',
port: port,
open: false,
disableHostCheck: false,
compress: isProd,
inline: !isProd,
stats: 'none'
However, when I start, ext plugin will still open new browser tab:

ℹ 「ext」: Opening browser at http://localhost:4501
ℹ 「ext」: Ending development build for angular
ℹ 「wdm」: Compiled successfully.

4 Nov 2019, 4:51 AM
In pluginUtil.js of the sencha webpack plugin module, there are the following lines:

if (options.browser == true && options.watch == 'yes' && vars.production == false) { if (vars.browserCount == 0) {
var url = 'http://localhost:' + options.port;

require('./pluginUtil').log(vars.app + `Opening browser at ${url}`);


const opn = require('opn');


You can either unset the options.watch parameter to something different or if that doesn't work comment out those lines.