miw-t-uwu-t-pub.id/gulptasks/scripts.gulp.js

27 lines
585 B
JavaScript
Raw Normal View History

2023-03-11 13:54:16 +00:00
let gulp = require('gulp'),
webpack = require('webpack');
// Use webpack to bundle JS and compile TS
// development env
gulp.task('webpack', (callback) => {
webpack(require('../webpack.config'), (err, stats) => {
if (err) {
throw err;
}
console.log(stats.toString());
callback();
});
});
// Use webpack to bundle JS and compile TS
// production ready
gulp.task('webpack-prod', (callback) => {
webpack(require('../webpack.config.prod'), (err, stats) => {
if (err) {
throw err;
}
console.log(stats.toString());
callback();
});
});