0.0.12 • Published 5 years ago

server-webpack-plugin v0.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

server-webpack-plugin

This plugin is still under development.

Installation

npm i --save-dev server-webpack-plugin

Basic Usage

NOTE: This plugin should only be used for development purposes.

Add the server-webpack-plugin to the plugins array in your Webpack file.

import ServerPlugin from 'server-webpack-plugin';

export default {
  entry: {
    server: ...,
  },
  ...
  plugins: [
    new ServerPlugin(),
  ],
};

Watch Mode

If you build your Webpack bundle in watch mode, server-webpack-plugin will automatically restart your server after every file change that initiates a new Webpack build.

If, for whatever reason, you need to disable server watch mode, set the { disableWatch: true } option.

Options

export default {
  entry: {
    foo: ...,
    bar: ..., // Set entryName option to 'bar'.
  },
  ...
  plugins: [
    new ServerPlugin({
      // Specify entry name
      entryName: 'bar', // default: 'server'
      
      // Disable automatic server restarts
      // while in Webpack watch mode.
      disableWatch: true, // default: false
      
      // Set log level.
      // Options: ['trace', 'debug', 'info', 'warn', 'error', 'silent']
      logLevel: 'silent', // default: 'debug'
    }),
  ],
};
0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago