JSPM

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

A set of well-thought 📦webpack-blocks for real-world projects

Package Exports

  • @futuregroup/webpack-custom-blocks

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 (@futuregroup/webpack-custom-blocks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

webpack-custom-blocks · npm

A set of well-thought 📦webpack-blocks for real-world projects.

API


setEnv([options])

Sets environmental variables to process.env and EnvironmentPlugin.

Arguments:

  • [options] (Object): Any enumerable properties.

Example:

setEnv({
    NODE_ENV: 'development',
    HOT: true,
    // Any other variables.
})

watch([options])

Watch mode.

Arguments:

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

reactHotServer([options])

Built on top of webpack-dev-server and react-hot-loader@3.

Arguments:

  • [options] (Object): Available properties:
    • [host] (String): Defaults to localhost.
    • [port] (Number|String): Defaults to 8080.
    • [publicPath] (String|Number): Defaults to '/'. The final output.publicPath will be http://${host}:${port}${path}.
    • ...rest (*): Any valid devServer properties.

babelLoader([options])

Built on top of babel-loader.

Arguments:

  • [options] (Object): Available properties:
    • [test] (*)
    • [fileType] (*): Defaults to application/javascript. If test is also set, then it adds a new fileType, else uses it as an existing one.
    • [exclude] (*)
    • [include] (*)
    • [babelOptions] (Object): babel-loader options.

cssLoader([options])

Built on top of style-loader and css-loader.

Arguments:

  • [options] (Object): Available properties:
    • [test] (*)
    • [fileType] (*): Defaults to text/css. If test is also set, then it adds a new fileType, else uses it as an existing one.
    • [exclude] (*)
    • [include] (*)
    • [loaders] (Array): Defaults to []. Additional loaders that go after css-loader.
    • [styleOptions] (Object): style-loader options.
    • [cssOptions] (Object): css-loader options.

stylusLoader([options])

Built on top of stylus-loader and extract-loader.

Arguments:

  • [options] (Object): Available properties:
    • [test] (*): Defaults to /\.(styl|stylus)$/.
    • [fileType] (*): Defaults to text/x-stylus.
    • [exclude] (*)
    • [include] (*)
    • [fileOptions] (Object)
    • [extractOptions] (Object)
    • [cssOptions] (Object)
    • [stylusOptions] (Object)

pugLoader([options])

Build on top of pug-html-loader.

Arguments:

  • [options] (Object): Available properties:
    • [test] (*): Defaults to /\.(pug|jade)$/.
    • [fileType] (*): Defaults to text/x-pug.
    • [exclude] (*)
    • [include] (*)
    • [fileOptions] (Object)
    • [pugOptions] (Object)

imageLoader([options])

Build on top of image-webpack-loader.

Arguments:

  • [options] (Object): Available properties:
    • [test] (*)
    • [fileType] (*): Defaults to image.
    • [exclude] (*)
    • [include] (*)
    • [fileOptions] (Object)
    • [imageOptions] (Object)

fontLoader([options])

Arguments:

  • [options] (Object): Available properties:
    • [test] (*)
    • [fileType] (*): Defaults to application/font.
    • [exclude] (*)
    • [include] (*)
    • [fileOptions] (Object)