makestatic-pack-webpack
v1.2.2
Published
Bundle assets using webpack
Downloads
7
Readme
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