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

资源文件时间版的后缀和资源定位有冲突 #239

Closed
zhouchengi opened this issue Dec 8, 2014 · 2 comments
Closed

资源文件时间版的后缀和资源定位有冲突 #239

zhouchengi opened this issue Dec 8, 2014 · 2 comments

Comments

@zhouchengi
Copy link

(为了简化点,未写全)

fis.config.set('roadmap.path', [
    {
        reg: /.*\.(js|css|less)$/,
        query: '?t=${timestamp}',
    }
]);    

//使用时间戳版的后缀

fis.config.merge({
    roadmap : {
        path : [
            {
                //所有的js文件
                reg : '**.js',
                //发布到/static/xxx目录下
                release : '/static/$&'
            },
            {
                //所有的css文件
                reg : '**.css',
                //发布到/static/xxx目录下
                release : '/static/$&'
            }
        ]
    }
});


//再使用资源定位资源定位

js使用了时间版的后缀

<script type="text/javascript" charset="utf-8" src="/static/js/jquery-2.1.1.min.js?t=201412816"></script>

但是css依然使用md5版的后缀

<link type="text/css" rel="stylesheet" href="/static/css/bootstrap.min_eb234f8.css">

感觉是我的配置有问题。

@hefangshi
Copy link
Member

@zhouchengi
Copy link
Author

还没看到这里来,非常感谢!

@oxUnd oxUnd closed this as completed Jun 24, 2015
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

3 participants