wtf-webpack-config
v0.1.3
Published
create webpack config more elegantly
Downloads
3
Maintainers
Readme
wtf-webpack-config
Like webpack-chain but the API is much simpler.
Install
$ npm install wtf-webpack-config
Usage
const path = require('path');
const publicPath = 'dist';
const assetPath = 'asset';
const config = new Config({
entry: './src/index.js',
output: {
path: path.resolve(__dirname, publicPath, assetPath),
filename: 'bundle.js',
publicPath: `${assetPath}/`,
},
devServer: {
contentBase: path.resolve(__dirname, publicPath),
},
});
config.use(config => {
// do something with config or config.config.
});
module.exports = config.toConfig();
See more examples