How to use the webpack-dev-server/lib/Server.addDevServerEntrypoints function in webpack-dev-server

To help you get started, we’ve selected a few webpack-dev-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tomachristian / css-entry-webpack-plugin / spec / helpers / common.js View on Github external
let run = new Promise((resolve, reject) => {
            try {
                let devServerOptions = this.webpackConfig.devServer || {};

                devServerOptions.host = host;
                devServerOptions.port = port;

                if (devServerOptions.quiet === undefined) {
                    devServerOptions.quiet = true;
                }

                if (devServerOptions.inline === undefined) {
                    devServerOptions.inline = true;
                }

                Server.addDevServerEntrypoints(this.webpackConfig, devServerOptions);
                this.compiler = webpack(this.webpackConfig);
                this.server = new Server(this.compiler, devServerOptions);
                this.client = request(this.server.app);

                this.server.listen(port, host, err => {
                    this.result = {
                        err,
                        stats: null
                    };
                    resolve(this);
                });
            }
            catch (err) {
                console.error(err);
                this.result = {
                    err,