Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否对 min.js 自动不启用? #2

Open
2betop opened this issue Sep 18, 2014 · 3 comments
Open

能否对 min.js 自动不启用? #2

2betop opened this issue Sep 18, 2014 · 3 comments

Comments

@2betop
Copy link
Contributor

2betop commented Sep 18, 2014

关于这个 bug , 有不少人遇到 fex-team/fis#87

能否自动对 min.js 不启用?或者能对文件内容进行智能判断,已经 uglify 过的源文件,别再重复 uglify 了,否则会卡很久。

@fouber
Copy link

fouber commented Sep 18, 2014

不用智能分析,这种需求在fis中被理解为一种关于文件命名的规范,fis中思考这个问题,并不是“我们通过一种智能的模式识别来判断js文件内容是否应该进行压缩”,而是改为思考“规定一种文件名不用对其进行压缩”,相比实现一种智能内容模式匹配,实现一种规范更为简单有效,而且在工程维护上,其他人一眼也能看明白,所以,fis解决这类问题的思路大致是:

fis.config.set('roadmap.path', [
    {
        reg: '**.min.js',
        useOptimizer: false
    }
]);

@note520
Copy link

note520 commented Nov 21, 2014

fis.config.set('roadmap.path', [
       {
                reg:'**.min.js',
                useOptimzier: false,
                release : '/static$&'
            },
            {
                reg: '**.js',
                release : '/static$&'
            }
]);

这样配置.min.js依然会被压缩,我怎么样做到**.min.js不压缩,而**.js进行压缩呢.有没排除那些js不进行压缩的方法?

@oxUnd
Copy link
Contributor

oxUnd commented Nov 21, 2014

useOptimzier拼错了,应该是useOptimizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants