Webpack block for the webpack dev server.
npm install @webpack-blocks/dev-server

This is the dev-server block providing webpack dev server configuration.
``js
const { createConfig, env } = require('@webpack-blocks/webpack')
const devServer = require('@webpack-blocks/dev-server')
module.exports = createConfig([
// use only if NODE_ENV === 'development':
env('development', [
devServer({
// Show full-screen overlay in the browser on compiler errors or warnings
overlay: true,
// If you need to proxy API requests:
proxy: {
'/api': { target: 'http://localhost:3000' }
}
})
])
])
`
Don’t forget to enable hot reload in your app. If you’re using React it may look like this:
`js
import React from 'react'
import ReactDOM from 'react-dom'
function render() {
ReactDOM.render(
render()
if (module.hot) {
module.hot.accept(render)
}
``
Check out the
Released under the terms of the MIT license.