webpack-config-metalab

0.2.2 • Public • Published

webpack-config-metalab

Just some handy webpack configuration generating functions.

If your webpack configuration is large, unwieldy and/or confusing it's time to think about breaking it apart with webpack-partial. Partials are functions that take as input an existing webpack configuration and give as output a new webpack configuration. The modules here are simply preconfigured partials to do a lot of the heavy lifting for you.

First install webpack-partial:

npm install --save webpack-partial

Then create yourself a webpack.config.js:

// The magic.
import partial from 'webpack-partial';
 
// Import useful partials.
import entry from 'webpack-config-entry';
import babel from 'webpack-config-babel';
 
// Setting up webpack has never been this fast.
export default partial(
  { entry: 'foo.js' },
  entry,
  babel
);

IMPORTANT: Right now these are ES6 modules only meaning you have to import with something like babel or use interop-require.

IMPORTANT: If you're adding your own partials that include a loader reference you must use require.resolve on it for npm@2.

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-config-metalab

Weekly Downloads

8

Version

0.2.2

License

none

Last publish

Collaborators

  • izaakschroeder