@webpack-blocks/webpack2
Advanced tools
Comparing version 0.4.0-rc to 0.4.0-rc.1
@@ -5,2 +5,3 @@ # @webpack-blocks/webpack2 - Changelog | ||
- Provide `createConfig.vanilla()` (see [#80](https://github.com/andywer/webpack-blocks/issues/80)) | ||
- Using updated `@webpack-blocks/core`, `@webpack-blocks/webpack-common` and updated blocks | ||
@@ -7,0 +8,0 @@ - Had to update integration test, due to `webpack-merge` update |
17
index.js
@@ -16,2 +16,3 @@ /** | ||
exports.createConfig = createConfig | ||
exports.createConfig.vanilla = createVanillaConfig | ||
@@ -35,2 +36,18 @@ exports.addPlugins = common.addPlugins | ||
* | ||
* Wraps @webpack-blocks/core's `createConfig` without `createConfig()`'s usual | ||
* default config. | ||
* | ||
* @param {Function[]} configSetters Array of functions as returned by webpack blocks. | ||
* @return {object} Webpack config object. | ||
*/ | ||
function createVanillaConfig (configSetters) { | ||
return core.createConfig(webpack, configSetters) | ||
} | ||
/** | ||
* Takes an array of webpack blocks and creates a webpack config out of them. | ||
* Each webpack block is a callback function which will be invoked to return a | ||
* partial webpack config. These partial configs are merged to create the | ||
* final, complete webpack config that will be returned. | ||
* | ||
* Wraps @webpack-blocks/core's `createConfig` to provide some sane default | ||
@@ -37,0 +54,0 @@ * configuration first. |
{ | ||
"name": "@webpack-blocks/webpack2", | ||
"version": "0.4.0-rc", | ||
"version": "0.4.0-rc.1", | ||
"description": "Webpack block for the webpack 2.x base configuration.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -48,4 +48,8 @@ # Webpack blocks - Webpack 2 base configuration | ||
Takes an array of config setters (the functions returned by invoked webpack blocks), invokes them and returns the resulting webpack config object. | ||
Takes an array of config setters (the functions returned by invoked webpack blocks), invokes them and returns the resulting webpack config object. Already sets some generic default config, like default CSS, font and image file loaders. | ||
#### createConfig.vanilla(configSetter: Function[]): object | ||
Works just like `createConfig()`, but provides no default configuration whatsoever. Use it only if you want to get rid of the default loaders for some reason. | ||
#### group(configSetters: Function[]): Function | ||
@@ -52,0 +56,0 @@ |
8389
81
92