hash-gaming / slackproval

The lightweight slack approved system for managing invites to an open slack community
MIT License
4 stars 0 forks source link

Make uglifier play nice with ES6, its 2019 for gods sake #48

Closed michaelstephens closed 4 years ago

michaelstephens commented 4 years ago

Purpose

Asset compilation is broken because uglifier does not suppor the es6 syntax out of the box.

Error

       Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
       --
        1336     return e.target;
        1337   } else if (e.target && e.target.matches('div.navbar-burger > span')) {
        1338     return e.target.parentElement;
        1339   }
        1340 }
        1341 
        1342 document.addEventListener('DOMContentLoaded', function() {
        1343   document.querySelector('.navbar-burger').addEventListener('click', function(e) {
          =>     const navbarBurger = getCorrectElementFromEvent(e);
        1345     navbarBurger.classList.toggle('is-active');
        1346     document.querySelector('#' + navbarBurger.dataset.target).classList.toggle('is-active');
        1347     e.stopPropagation();
        1348   });
        1349 });
        1350 
        1351 document.addEventListener('click', function(e) {
        1352   if (e.target && e.target.matches('.notification > button.delete')) {
       ==