Use webpack to transpile and bundle your source files.
You will need to provide a webpack.config.js
file in your project root. For more information on webpack configuration, see https://webpack.github.io/docs/configuration.html.
Returns a Promise that resolves when the build is finished.
- watch (boolean) Whether to watch for changes or not. Default:
false
. - watchOptions (Object) Watch options for webpack. Default:
null
. - config (Object) Configuration for webpack. Default: uses
webpack.config.js
from your project root. - statsOptions (Object) Stats options for webpack. Default:
{
'colors': true,
'modules': false,
'chunks': false,
'exclude': ['node_modules']
}
var webpackBuild = require('ionic-gulp-webpack');
gulp.task('build', webpackBuild);
gulp.task('watch', function(){
return webpackBuild({
watch: true,
statsOptions: {
'colors': false,
'errorDetails': true
}
})
});