Skip to content

webpack-preset/webpack-conf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.config)

About

🔩 Programmatically manage your webpack configuration

Resources

Stars

Watchers

Forks

Packages

No packages published