Run Webpack development server.
$ yarn add --dev @start/plugin-lib-webpack-dev-server
# or
$ npm install --save-dev @start/plugin-lib-webpack-dev-server
webpackServe(config: WebpackConfig, devServerConfig?: WebpackDevServerConfig)
Default:
{
host: '127.0.0.1',
port: 8080
}
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
}
)
)
}