Laravel-JS-Localization icon indicating copy to clipboard operation
Laravel-JS-Localization copied to clipboard

Versioning on the lang.js file?

Open emilsrits opened this issue 2 years ago • 1 comments

I am having a problem with the outputted JS translations being cached and new texts not getting displayed until browser cache is cleared.

Is it possible to have versioning on lang.js file with Laravel Mix or maybe some other solution to this?

I am compiling it like in docs via webpack shell plugin:

new WebpackShellPluginNext({
    onBuildStart: {
        scripts: [`php artisan lang:js ${distCommon}/js/lang.js --quiet`]
    },
})

emilsrits avatar Mar 02 '22 11:03 emilsrits

@rmariuzzo This might be useful for cache busting.

Wulfheart avatar Apr 30 '22 19:04 Wulfheart