Socket
Book a DemoInstallSign in
Socket

@reactway/webpack-builder-plugin-web-dev

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reactway/webpack-builder-plugin-web-dev

A plugin made for webpack-builder.

latest
Source
npmnpm
Version
2.0.4
Version published
Weekly downloads
6
100%
Maintainers
3
Weekly downloads
 
Created
Source

@reactway/webpack-builder-plugin-web-dev

A plugin made for webpack-builder. Plugin that provides a development server that gives live reloading and should be used only for development.

Getting started

$ npm i @reactway/webpack-builder-plugin-web-dev

Add plugin into webpack config by using use() builder method.

const webpackBuilder = require("@reactway/webpack-builder");
const webpackDevServer = require("@reactway/webpack-builder-plugin-web-dev");

module.exports = new webpackBuilder.Builder(__dirname, {
    entry: "./src/app.js",
    output: {
        path: "./dist",
        filename: "[name].bundle.js"
    }
})
    .use(webpackDevServer)
    .toConfig();

Passing options

By giving any option it will fully override default options.

let webDevServer: WebpackDevServer.Configuration | undefined = {
    contentBase: "./dist",
    compress: true,
    host: "0.0.0.0",
    quiet: false,
    port: 3000,
    historyApiFallback: true
};

It is wrapped webpack-dev-server. All options you can pass from the wrapped package. Available options you can check at webpack-dev-server-options.

const webpackBuilder = require("@reactway/webpack-builder");
const webpackDevServer = require("@reactway/webpack-builder-plugin-web-dev");

module.exports = new webpackBuilder.Builder(__dirname, {
    entry: "./src/app.js",
    output: {
        path: "./dist",
        filename: "[name].bundle.js"
    }
})
    .use(webpackDevServer, {
        port: 3001,
        quiet: true,
        ...
    })
    .toConfig();

Suggest using @reactway/webpack-builder-plugin-web-dev together with @reactway/webpack-builder-plugin-html.

Documentation

WIP

License

Released under the MIT license.

Keywords

webpack

FAQs

Package last updated on 20 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts