JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q43860F
  • License MIT

Just a few blocks that 📦webpack-blocks is missing

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 · npm

Just a few blocks that 📦webpack-blocks is missing.

Designed to be used with webpack@3+ and webpack-blocks@1+.

Table of Content

API

setEnv([options])

Sets environmental variables to process.env and EnvironmentPlugin.

Arguments

  1. [options] (Array|Object): Any enumerable properties.

Example

setEnv({
  NODE_ENV: 'development',
  HOT: true,
})

watch([options])

Watch mode.

Arguments

  1. [options] (Object): See watchOptions for available properties.

parser([options])

Parser options.

Arguments

  1. [options] (Boolean|Object): See Rule.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

  1. [options] (Object): image-webpack-loader options.

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(),
  ]),
]);

stylus([options])

Arguments

  1. [options] (Object): stylus-loader options.

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

  1. [options] (Object): extract-loader options.

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,
    }),
  ]),
]);