Uglifier::Error: Unexpected token: punc ()).

To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
This commit is contained in:
Simon Legner 2024-01-06 18:03:54 +01:00
parent 92b009800d
commit a06462f6e3

View file

@ -94,7 +94,7 @@ class App < Sinatra::Application
['/manifest.json', { 'Cache-Control' => 'public, max-age=86400' }] ['/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.css_compressor = :sass
Sprockets::Helpers.configure do |config| Sprockets::Helpers.configure do |config|