Terser strip comments

This commit is contained in:
djmaze 2020-03-20 16:01:23 +01:00
parent c3e4a19447
commit a1ce3f0e84

View file

@ -64,7 +64,9 @@ const jsMin = () =>
.pipe(gulpif(config.source, sourcemaps.init({ loadMaps: true }))) .pipe(gulpif(config.source, sourcemaps.init({ loadMaps: true })))
.pipe(replace(/"rainloop\/v\/([^/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"')) .pipe(replace(/"rainloop\/v\/([^/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
.pipe(rename({ suffix: '.min' })) .pipe(rename({ suffix: '.min' }))
.pipe(terser()) .pipe(terser({
output: {comments: false}
}))
.pipe(eol('\n', true)) .pipe(eol('\n', true))
.pipe(gulpif(config.source, sourcemaps.write('./'))) .pipe(gulpif(config.source, sourcemaps.write('./')))
.pipe( .pipe(