@financial-times/n-webpack
v3.1.0
Published
Build the webpack.config.js of your dreams :relaxed:
Downloads
284
Maintainers
Keywords
Readme
n-webpack
Build the webpack.config.js of your dreams :relaxed:
const nWebpack = require('@financial-times/n-webpack');
exports a function accepting the following options:
withBabelPolyfills
: default true - Includes babel's core-js polyfills in your js bundleECMAScriptVersion
: default 5 - ES version to compile down toentry
: Object used to configure webpack's entry pointsincludes|include
: Array of files/directories/globs to run babelifying over (in addition to ./client, ./shared, ./bower_components, which are included by default)excludes|exclude
: Array of files/directories/globs to exclude from babelificationoutput
: options passed in to webpack output. default{filename: '[name]'}
env
: prod or dev, to force dev or prod buildoutputStats
: a filename to output stats about the build tobabelPlugins
: an array of extra babel plugins to apply, e.g.babelPlugins: ['transform-async-to-generator']