Package Exports
- webpack-blocks-more
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpack-blocks-more) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
webpack-blocks-more · 
Just a few blocks that 📦webpack-blocks is missing.
Designed to be used with webpack@3+ and webpack-blocks@1+.
Table of Content
API
watch([options])
Watch mode.
Arguments
[options](Object): SeewatchOptionsfor available properties.
parser([options])
Parser options.
Arguments
[options](Boolean|Object): SeeRule.parser
Example
const {createConfig} = require('@webpack-blocks/webpack');
const {parser} = require('webpack-blocks-more');
module.exports = createConfig([
parser({
amd: false,
browserify: false,
requireJs: false,
system: false,
requireInclude: false,
requireEnsure: false,
}),
]);image([options])
Arguments
[options](Object):image-webpack-loaderoptions.
Example
const {createConfig, match} = require('@webpack-blocks/webpack');
const {file} = require('@webpack-blocks/assets');
const {image} = require('webpack-blocks-more');
module.exports = createConfig([
match(['*.jpg', '*.png'], [
file(),
image(),
]),
]);postcss([options])
Arguments
[options](Object):postcss-loaderoptions.
Example
const {createConfig, match} = require('@webpack-blocks/webpack');
const {file, css} = require('@webpack-blocks/assets');
const {extract, postcss} = require('webpack-blocks-more');
module.exports = createConfig([
// for development:
match('*.styl', [
css(),
postcss({
plugins: {
autoprefixer: {}
}
}),
]),
// for production:
match('*.styl', [
file({
name: '[hash:20].css',
}),
extract(),
css({
styleLoader: false,
}),
postcss({
plugins: {
autoprefixer: {}
}
}),
]),
]);stylus([options])
Arguments
[options](Object):stylus-loaderoptions.
Example
const {createConfig, match} = require('@webpack-blocks/webpack');
const {file, css} = require('@webpack-blocks/assets');
const {extract, stylus} = require('webpack-blocks-more');
module.exports = createConfig([
// for development:
match('*.styl', [
css(),
stylus(),
]),
// for production:
match('*.styl', [
file({
name: '[hash:20].css',
}),
extract(),
css({
styleLoader: false,
}),
stylus(),
]),
]);extract([options])
Arguments
[options](Object):extract-loaderoptions.
Example
const {createConfig, match} = require('@webpack-blocks/webpack');
const {file, css} = require('@webpack-blocks/assets');
const {extract} = require('webpack-blocks-more');
module.exports = createConfig([
match('*.css', [
file({
name: '[hash:20].css',
}),
extract(),
css({
styleLoader: false,
}),
]),
]);