benhoIIand / grunt-cache-bust

Cache bust static assets using content hashing
MIT License
265 stars 103 forks source link

Cache bust generates triple query param #229

Open akaNightmare opened 7 years ago

akaNightmare commented 7 years ago

Grunt task

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        cacheBust: {
            build: {
                options: {
                    queryString: true,
                    baseDir: './assets/',
                    jsonOutput: true,
                    assets: ['css/**/*.css', 'js/**/*.js'],
                },
                files: [{
                    expand: true,
                    src: ['./views/**/*.ejs']
                }]
            }
    })

Result:

    <script src="/js/plugins/jquery.js?3210f0f7a3c99d2e?3210f0f7a3c99d2e?3210f0f7a3c99d2e"></script>
akaNightmare commented 7 years ago

as I see relates to https://github.com/hollandben/grunt-cache-bust/pull/227