Skip to content

Commit

Permalink
Use mix versioning for cache busting
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiam committed Feb 28, 2018
1 parent ca1aab7 commit 73b1e6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/theme.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<link rel="shortcut icon" href="{{ asset('/favicon.png') }}">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
<link rel="stylesheet" href="{{ asset('css/animate.css') }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
Expand Down Expand Up @@ -58,7 +58,7 @@
</div>
</div>

<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ mix('js/app.js') }}"></script>
<script class="pjax" src="https://www.google.com/recaptcha/api.js" async defer></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112098642-1"></script>
<script>
Expand Down
4 changes: 4 additions & 0 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ let mix = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');

if(mix.inProduction()) {
mix.version();
}

0 comments on commit 73b1e6f

Please sign in to comment.