tattersoftware / codeigniter4-assets

Asset handling for CodeIgniter 4
MIT License
50 stars 12 forks source link

disable dynamic parameter .js?v=1599757859 #18

Closed gragia79 closed 3 years ago

gragia79 commented 3 years ago

is it possible to disable dynamic generation of parameters for js and css files? because it does not allow the file debugger. name_file.js?v=1599757859 only name_file.js I could not understand if it is generated by codeigniter or by this library. I apologize if it's off the subject.

MGatner commented 3 years ago

That's from this library. Currently it is always on but I will add an option for it.

gragia79 commented 3 years ago

Ah ok thanks. In development off In production on Or i change this in my programm. Thanks you.

MGatner commented 3 years ago

Let's leave this open as a feature request. I have some big changes coming to Assets but I think this would be a quick hotfix I can push through soon.

gragia79 commented 3 years ago

where can i disable this manually? for the moment? Thanks you.

MGatner commented 3 years ago

@gragia79 Did you see the latest release with $config->useTimestamps? If you want to make it environment dependent I suggest putting something like this in app/Config/Assets.php:

<?php namespace Config;

class Assets extends \Tatter\Assets\Config\Assets
{
    // Whether to append file modification timestamps on asset tags
    public $useTimestamps = ENVIRONMENT === 'production';
}
gragia79 commented 3 years ago

thanks I try now

gragia79 commented 3 years ago

works perfectly thanks you. i added this code for checking.

        class Assets extends \Tatter\Assets\Config\Assets {
                 // Whether to append file modification timestamps on asset tags
             public $useTimestamps = ENVIRONMENT === 'production';
             // Whether to continue instead of throwing exceptions
            public $silent = ENVIRONMENT !== 'production';
                ...........