Home Core Concepts Contributing Fluent API Presets Runners (core)Babel ESLint Jest Prettier TSLint Webpack Runners (other)Starter Kits

# Webpack

> A bundler for javascript and friends

The `@berun/runner-webpack` package provides a high level fluent interface for configuring and using `Webpack`.

## Installation

`@berun/runner-webpack` is a common runner that is automatically included by BeRun presets such as `@berun/preset-react`. If you need to install it directly, follow these directions:

    $ npm install --save-dev @berun/runner-webpack

    // berun.config.ts
    export default {
      use: [ '@berun/runner-webpack']
    }

## Example usage

      berun.webpack
        .entry('main')
        .when(!ISPRODUCTION, entry =>
          entry.add(require.resolve('react-dev-utils/webpackHotDevClient'))
        )
        .add(berun.options.paths.appIndexJs)
        .end()

‹ previous
next ›