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

css, js 文件未压缩 #811

Open
AprilJoy opened this issue Nov 13, 2017 · 4 comments
Open

css, js 文件未压缩 #811

AprilJoy opened this issue Nov 13, 2017 · 4 comments

Comments

@AprilJoy
Copy link

配置(已经安装clean-css 和 clean-css模块)
fis.match('.js', {
optimizer: fis.plugin('uglify-js')
});
fis.match('
.css', {
optimizer: fis.plugin('clean-css')
});
运行命令fis3 release 后产生的css和js文件和开发环境的文件大小和内容格式一模一样。
请问一下这是什么原因?

@oxUnd
Copy link
Contributor

oxUnd commented Nov 13, 2017

你在哪儿看产出的?

@AprilJoy
Copy link
Author

fis3 server open 看的自带的部署目录

@oxUnd
Copy link
Contributor

oxUnd commented Nov 14, 2017

你在确认一下,这个是最基本功能,我这边无法复现。

你可以

fis3 release -d ./output 

在 output 的目录再确认下;

另外,你可以使用

fis3 inspect --files *.js

来查看具体 optimizer 属性有没有 match 到 js 上。

如果没有可能你后部的配置覆盖了前部的配置。

@AprilJoy
Copy link
Author


image

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

2 participants