wtf-webpack-config

0.1.3 • Public • Published

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

LICENSE

MIT

/wtf-webpack-config/

    Package Sidebar

    Install

    npm i wtf-webpack-config

    Weekly Downloads

    1

    Version

    0.1.3

    License

    MIT

    Last publish

    Collaborators

    • dgeibi