Search Posts

Category: grunt-contrib-uglify

Grunt uglify using babel not working es6

For the past day I have been struggling with minifying my angularJs file. The file is in es6 format. The angularJs file var myApp = angular.module(‘myApp’, [‘ui.router’, ‘testData’]); angular.element(document).ready(() => { window.xxx = xxx(‘path’); window.xxx.init({ onLoad: ‘login-required’ }) .success((authenticated) => { //code }) .error(function() { window.location.reload(); }); }); myApp.config(function($stateProvider, $urlRouterProvider, $httpProvider) { $httpProvider.interceptors.push(‘authInterceptor’); //ui router code }); myApp.factory(‘authInterceptor’, function($q, Auth) { return { request: function (config) { //code return deferred.promise; } }; }); The package.json […]