-
Notifications
You must be signed in to change notification settings - Fork 38
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
allInOne打包时,生成的css和js哈希值不对,导致404 #43
Comments
这里延伸出一个问题: |
大概找出原因了,是因为在pack时设置了以下配置:
这里pack.js就取了这个参数,没有区分不同的php文件,默认 |
附上稍微优雅一点点的配置方法:
看了源代码才知道可以这样玩。 |
@geeyan 我使用${hash}之后, 生成的js 和 css文件的hash值是一样的. 而且我修改css文件后,重新生成的hash值并没有改变, 不知道为什么 edit 看了源码, 生成的hash是根据html文件计算的, 而不是根据pack的所有文件计算的. 有没有什么办法能够根据合并的文件来生成一个hash呢 |
你给 js 和 css 加上 |
我的配置是有前置脚本的=。=
类似生成以下css: |
@treri 我加上${hash},也有部分资源404的情况,你是怎么解决? |
页面加载的内容:


css:
js:
git status -sb
实际生成结果:fis-conf.js 部分配置如下:
clear_and_release
时,解析出的html源码中资源显式加载,没有错误;clear_and_release
这个media的时候,就会造成合并的hash值不对,请问这里是有什么配置冲突,或者是loader收集内容时有误?应该怎么解决呢?The text was updated successfully, but these errors were encountered: