Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Latest commit

 

History

History

plugin-lib-webpack-dev-server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

🏭 plugin-lib-webpack-dev-server

npm linux windows coverage deps

Run Webpack development server.

Install

$ yarn add --dev @start/plugin-lib-webpack-dev-server
# or
$ npm install --save-dev @start/plugin-lib-webpack-dev-server

Usage

Signature

webpackServe(config: WebpackConfig, devServerConfig?: WebpackDevServerConfig)

config

webpack config.

devServerConfig

webpack devServer config.

Default:

{
  host: '127.0.0.1',
  port: 8080
}

Example

import sequence from '@start/plugin-sequence'
import env from '@start/plugin-env'
import webpackDevServer from '@start/plugin-lib-webpack-dev-server'

export const task = async () => {
  const { default: webpackDevConfig } = await import('./webpack.dev')

  return sequence(
    env({ NODE_ENV: 'development' }),
    webpackDevServer(
      webpackConfig,
      {
        hot: true,
        port: 3000
      }
    )
  )
}