1.1.0-alpha.0 • Published 5 years ago

@what-src/webpack-plugin v1.1.0-alpha.0

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

@what-src/webpack-plugin

what-src webpack-plugin.

Check out the packages folder for more information.

Usage

Via .webpack.config.js

const { WhatSrcServerWebpackPlugin } = require('@what-src/plugin') // <- import plugin

...
module.exports = {
  mode: 'development',
  entry: './src/index.jsx',
  output: {
    filename: 'bundle.js',
  },
  ...
plugins: [new WhatSrcServerWebpackPlugin(options)] // <- add plugin
...
}

options

options are defined by the type

type Options = {
  productionMode?: boolean;
  host?: string;
  port?: number;
  endpoint?: string;
  shh?: boolean;
};

- productionMode: boolean

  • Enable running what-src in production mode (default: false)

- host: string

  • The host to serve on (default: localhost)

- port: number

  • The port to serve on (default: 8018)

- endpoint: string

  • The url mount path of the @what-src/middleware (default: __what_src)

- shh: boolean

  • Turns off logging (default: false)

License

MIT