# webpack-configure

> Builds webpack config files

Latest version **0.6.0** (published 2017-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-configure
pnpm add webpack-configure
yarn add webpack-configure
bun add webpack-configure
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2017-03-27 |
| First published | 2017-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hendrik Volschenk |
| Maintainers | hvolschenk |
| Keywords | webpack |

## Links

- npm: https://www.npmjs.com/package/webpack-configure
- Repository: https://github.com/hvolschenk/webpack-configure
- Homepage: https://github.com/hvolschenk/webpack-configure#readme
- Issues: https://github.com/hvolschenk/webpack-configure/issues
- npm.io page: https://npm.io/package/webpack-configure

## Dependencies (2)

- [webpack](https://npm.io/package/webpack.md) ^2.2.1
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^2.28.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.6.0 (latest) — 2017-03-27
- 0.5.0 — 2017-03-27
- 0.4.1 — 2017-03-27
- 0.4.0 — 2017-03-22
- 0.3.1 — 2017-03-16
- 0.3.0 — 2017-03-15
- 0.2.3 — 2017-03-15
- 0.2.2 — 2017-03-14
- 0.2.1 — 2017-03-13
- 0.2.0 — 2017-03-13
- 0.1.1 — 2017-03-12
- 0.1.0 — 2017-03-12
- 0.0.0 — 2017-03-12
- 0.0.0-semver — 2017-03-12

## README

# webpack-configure
[![Build Status](https://travis-ci.org/hvolschenk/webpack-configure.svg?branch=master)](https://travis-ci.org/hvolschenk/webpack-configure) [![Coverage Status](https://coveralls.io/repos/github/hvolschenk/webpack-configure/badge.svg?branch=master)](https://coveralls.io/github/hvolschenk/webpack-configure?branch=master)

A webpack config file builder.

### Setup

Add the **webpack-configure** package to your application via npm.

```
$ npm i -D webpack-configure
```

### Usage

Use **webpack-configure** inside the _webpack.config.js_ file to generate the config for you:

```
const webpackConfigure = require('webpack-configure');

module.exports = webpackConfigure();
```

##### Options

A list of options can be passed to `webpackConfigure()`, they are all optional:

Name                      | Type      | Default          | Description
--------------------------|-----------|------------------|----------------------------------------------------
build.namedModules        | _Boolean_ | **true**         | Enables the NamedModules plugin
build.vendor              | _Boolean_ | **false**        | Creates a vendor bundle build
devServer.hot             | _Boolean_ | **true**         | Enables hot module reload on the development server
devServer.isEnabled       | _Boolean_ | **true**         | Adds `webpack-dev-server` as a development server
devServer.logLevel        | _String_  | **error**        | The log level for `webpack-dev-server`
devServer.port            | _Integer_ | **2222**         | The port that `webpack-dev-server` will listen on
entry.app                 | _String_  | **index.jsx**    | The main entry file into the application
entry.vendor              | _String_  | **vendor.js**    | The main entry file into the vendor build
html.isEnabled            | _Boolean_ | **true**         | Whether an html template must be used
html.template             | _String_  | **index.html**   | The location of the html template file
languages.css             | _Boolean_ | **true**         | Whether CSS is used in the application
languages.javascript      | _Boolean_ | **true**         | Whether JavaScript is used in the application
languages.jsx             | _Boolean_ | **true**         | Whether JSX is used in the application
languages.sass            | _Boolean_ | **true**         | Whether Sass is used in the application
output.app                | _String_  | **bundle.js**    | The name of the output bundle of the application
output.vendor             | _String_  | **vendor.js**    | The name of the output file of the vendor bundle
packages.npm              | _Boolean_ | **true**         | Whether npm is used to install packages in the application
packages.reactFlexboxGrid | _Boolean_ | **true**         | Whether a rule for the react-flexbox-grid package is to be loaded
packages.reactToolbox     | _Boolean_ | **true**         | Whether a rule for the react-toolbox package is to be loaded
paths.app                 | _String_  | **app**          | The application folder location
paths.build               | _String_  | **build**        | The build folder location
paths.root                | _string_  | **../../../../** | The path to the root of the application relative to webpack-configure

---------------
## Contributing

### Testing

All tests are run through [mocha](https://mochajs.org/), with the [chai](http://chaijs.com/)
assertion library.

To run the tests (and the linter - more on that below):

```
$ npm test
```

To run the tests by themselves without the linter:

```
$ npm run test:scripts
```

### Linting

Linting is done via [eslint](http://eslint.org/) on the
[eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb) configuration.

Linting can be run together with the tests with:

```
$ npm test
```

To run linting alone without the tests:

```
$ npm run lint
```

---
_Source: https://npm.io/package/webpack-configure · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
