This package has been deprecated

Author message:

Use CRA instead

madewithlove-webpack-config

7.0.0 • Public • Published

Madewithlove Webpack configuration

Build Status

Installation

Install the package

$ npm install madewithlove-webpack-config --save-dev

Usage

Basic usage

webpack.config.babel.js

import config from 'madewithlove-webpack-config';
 
export default config();

You can also fine-tune aspects of the configuration:

webpack.config.babel.js

import config from 'madewithlove-webpack-config';
 
export default config({
    react: true,
    sourcePath: 'src',
    outputPath: 'builds',
    enableRiskyOptimizations: true,
});

Advanced usage

webpack.config.babel.js

import config from 'madewithlove-webpack-config';
 
export default config().merge({
    module: {
        loaders: [
            // Append a loader
        ],
    }
    plugins: [
        // Append a plugin
    ],
});

Using templates

webpack.config.babel.js

import {factory} from 'madewithlove-webpack-config';
 
const template = (config, options, loaders, plugins) => {
    return config.merge({
        devtool: options.development ? 'foo' : 'bar',
        module: {
            loaders: [
                loaders.css,
                loaders.js,
                {
                    test: options.someExtraOption,
                }
            ],
        },
        plugins: [plugins.uglify]
    });
};
 
export default factory(template, {
    someExtraOption: 'foo',
});

Dependents (0)

Package Sidebar

Install

npm i madewithlove-webpack-config

Weekly Downloads

1

Version

7.0.0

License

MIT

Unpacked Size

1.11 MB

Total Files

128

Last publish

Collaborators

  • anahkiasen
  • bramdevries