ext-webpack
Webpack project builder. webpack configuration file is loaded first if available. And then, it is overridden with rtb.moduleOptions.webpack settings if available.
If rtb.conf.src(BuildConfig.src) is specified, it will override the 'entry' value of webpack configuration. A string or an array of string is allowed, but it cannot specify multiple entry points. To configure multiple entry points, use moduleOptions.webpack option or separate webpack configuration file.
If rtb.conf.dest(BuildConfig.dest) is specified, it will override output.path of webpack configuration.
If rtb.conf.outFile(BuildConfig.outFile) is specified, it will override output.filename of webpack configuration.
To enable sourceMap, add devtool option to webpack configuration file. For more details, refer to webpack documentation on Devtool.
Usage
Options
options will override rtb.moduleOptions. Following options are available additionally.
Option | Type | Default | Description |
---|---|---|---|
configFile | string | undefined | Config file name to override buildOptions.webpackConfig. |
rtb.buildOptions (BuildConfig.buildOptions)
Option | Type | Default | Description |
---|---|---|---|
webpackConfig | string | undefined | webpack config file name. |
printConfig | boolean | false | Print webpack config settings actually used. |
rtb.moduleOptions (BuildConfig.moduleOptions)
property | type | default | description |
---|---|---|---|
webpack | Object | {} | Options to gulp-webpack. |
Example
Notes
This extension is for custom processing. Use GWebpackBuilder for webpack processiing.