0.1.0 • Published 8 years ago

webpack-conf v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Webpack Conf

Programmatically manage your webpack configuration

npm version npm version npm downloads webpack channel on discord

Webpack is primarily configured via an object full of various options. This works well for single projects and purpose-built configurations. It's also very powerful, as you have the full feature set of Node available to you. However, if you work on multiple projects that share a common build or would like to more easily configure your builds for different environments, you basically have to program up your own solution to these problems.

webpack-conf provides a simple API for building and modifying a webpack configuration object. This lets you make more stable changes to your config with less coupled, brittle configuration code.

While primarily built for webpack-preset, this could also enable things such as libraries that more easily plug in to existing webpack configurations. If you have a use case that isn't yet covered by the API, but can be enabled, please reach out and open an issue!

Installation

npm install --save webpack-conf

Basic Usage

More extensive API docs coming soon...

const conf = new WebpackConf()

conf.setEntry(path.resolve('./src/entry.js'))
conf.setOutputPath(path.resolve(__dirname, 'build'))
conf.setOutputFilename('bundle.js')

const compiler = webpack(conf.toConfig())