From a06462f6e3086215cde482326489498eaf49bdea Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 6 Jan 2024 18:03:54 +0100 Subject: [PATCH] Uglifier::Error: Unexpected token: punc ()). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). --- lib/app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.rb b/lib/app.rb index 6d197b4a..f7d871a1 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -94,7 +94,7 @@ class App < Sinatra::Application ['/manifest.json', { 'Cache-Control' => 'public, max-age=86400' }] ] - sprockets.js_compressor = Uglifier.new output: { beautify: true, indent_level: 0 } + sprockets.js_compressor = Uglifier.new output: { :harmony => true, beautify: true, indent_level: 0 } sprockets.css_compressor = :sass Sprockets::Helpers.configure do |config|