Nonstop Perpetual Motion

    makestatic-pack-webpack

    1.2.2 • Public • Published

    Webpack

    Webpack asset bundling

    Bundles assets using webpack.



    Install

    yarn add makestatic-pack-webpack
    

    API

    PackWebpack

    Bundles source file assets using webpack.

    .before

    PackWebpack.prototype.before(context[, options])

    Configures the webpack compiler with system plugins.

    If the configuration option pack is disabled this function call is a noop.

    If the watch configuration option is set the compiler watches source files and the returned promise will never resolve. In this instance the webpack plugin is responsible for executing the rest of the lifecycle at the appropriate time.

    Returns a promise that resolves when compilation is complete.

    • context Object the processing context.
    • options Object plugin options.

    Config

    Converts the build configuration into a webpack compatible configuration removing fields that are not used by webpack.

    Config

    new Config(context)

    Creates a Config.

    • context Object the processing context.

    .getConfig

    Config.prototype.getConfig(system, options)

    Get a webpack compatible configuration.

    • system Object plugins required by the system.
    • options Object plugin options.

    PackPlugin

    System webpack plugin.

    .addFiles

    PackPlugin.prototype.addFiles(compilation, files)

    Adds compilation entries.

    Returns a promise that resolves when all the files have been added.

    • compilation Object the webpack compilation.
    • files Array list of files to add to the compilation.

    .apply

    PackPlugin.prototype.apply(compiler)

    Webpack plugin entry point that configures the webpack plugin functions.

    • compiler Object the webpack compiler.

    License

    MIT


    Created by mkdoc on March 12, 2017

    Install

    npm i makestatic-pack-webpack

    DownloadsWeekly Downloads

    129

    Version

    1.2.2

    License

    MIT

    Last publish

    Collaborators

    • muji
    • tmpfs