0.0.12 • Published 6 years ago

server-webpack-plugin v0.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
6 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

6 years ago

0.0.11

6 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago