Skip to content

Commit 10d8026

Browse files
committed
Fine-tune Terser to save some bytes
1 parent 1c79040 commit 10d8026

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Gruntfile.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ module.exports = function (grunt)
218218

219219
// Minify and copy JavaScript files from `node_modules` and from `src/js/` to `public/assets/js/`.
220220
terser: {
221+
options: {
222+
ecma: 2015,
223+
compress: {
224+
booleans_as_integers: true,
225+
drop_console: true
226+
},
227+
format: {
228+
comments: false
229+
}
230+
},
221231
dist: {
222232
files: [
223233
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"grunt-replace-regex": "1.0.3",
2525
"grunt-sass": "3.1.0",
2626
"grunt-stylelint": "0.16.0",
27-
"grunt-terser": "1.0.0",
27+
"grunt-terser": "2.0.0",
2828
"load-grunt-tasks": "5.1.0",
2929
"sass": "1.32.5",
3030
"stylelint": "13.9.0",

0 commit comments

Comments
 (0)