标签: gulp-minify

角度js缩小后出错.错误:[$ injector:unpr]未知提供者:eProvider < - e < - makeErrorsDirective

我用Gulp来缩小我的整个js文件.一旦缩小,我得到如下错误:

[$injector:unpr] Unknown provider: eProvider <- e <- makeErrorsDirective.
Run Code Online (Sandbox Code Playgroud)

我的控制器文件中有一个Custom指令.

var myhubdashboardControllers = angular.module('vpdashboardmodule', []);

.directive('mhDashboard', function ($http, authService, apiService) {
    return {
        restrict: 'EA',
        scope: {
            name: '@',
            dash: '@',
            report: '@',
            disname: '@',
            disdesc: '@',
            distot: '@'
        },
        templateUrl: 'views/dashboard/dashboard-direc.html',
        link: function (scope, element, attr) {
            scope.linkChk = scope.name;
            switch (scope.linkChk) {
                case 'Shipped This Week':
                    scope.url = 'erp/JobShipmentList/PostCpsVwShipmentCount';
                    scope.shipstatus = "Departure";
                    scope.period = "ThisWeek";
                    scope.basicfilter = "Open";
                    scope.linkName = "Shipments";
                    scope.linkDesc = "Shipped This Week";
                    break;
Run Code Online (Sandbox Code Playgroud)

}); …

javascript minify angularjs bundling-and-minification gulp-minify

6
推荐指数
1
解决办法
1万
查看次数

gulp-minify 不重命名原始文件

可以在不添加 -min 后缀的情况下缩小 js 文件吗?

我要保留原名。

gulp.task("js-external-release", function() {
    gulp.src(config.vendorJs)
        .pipe(minify())
        .pipe(gulp.dest(config.dist + "/scripts"));
});
Run Code Online (Sandbox Code Playgroud)

javascript gulp gulp-minify

5
推荐指数
2
解决办法
2981
查看次数