Open verlok opened 6 years ago
I know this has been open for awhile, but there are rollup plugins for minifying.
If you are using es5 you can use the following plugin, or if you're using es6 you can use this plugin.
Simply add the plugin to your rollup plugins
option and you should be good to go.
Example:
gulp.task('scripts', () => {
return gulp
.src('main.js')
.pipe(sourcemaps.init())
.pipe(rollup({ plugins: [uglify(), babel()] }, { format: 'cjs' }))
.pipe(sourcemaps.write(''))
.pipe(gulp.dest('dist'));
});
Hey, how can I minify the script using uglify or other similar?
I'm currently doing:
But if I try to add the following lines afterwards, the code I get in
destFolder
is ES6 code.What am I doing wrong?