Webpack
Webpack asset bundling
Bundles assets using webpack.
Install
yarn add makestatic-pack-webpack
API
PackWebpack
Bundles source file assets using webpack.
.before
PackWebpackprototype
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
context
Creates a Config.
context
Object the processing context.
.getConfig
Configprototype
Get a webpack compatible configuration.
system
Object plugins required by the system.options
Object plugin options.
PackPlugin
System webpack plugin.
.addFiles
PackPluginprototype
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
PackPluginprototype
Webpack plugin entry point that configures the webpack plugin functions.
compiler
Object the webpack compiler.
License
MIT
Created by mkdoc on March 12, 2017