Extract vendor packages in any mix build

This commit is contained in:
Bubka 2020-03-12 12:19:23 +01:00
parent c3a4209e15
commit 5aed829813
2 changed files with 10 additions and 9 deletions

View File

@ -26,6 +26,8 @@
var appSettings = {!! $appSettings !!};
var appVersion = '{{ config("app.version") }}';
</script>
<script src="{{ mix('js/manifest.js') }}"></script>
<script src="{{ mix('js/vendor.js') }}"></script>
<script src="{{ mix('js/app.js') }}"></script>
<script src="{{ mix('js/locales.js') }}"></script>
</body>

17
webpack.mix.js vendored
View File

@ -13,17 +13,16 @@ const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.js('resources/js/langs/locales.js', 'public/js')
.extract([
'vue',
'axios',
'vue-axios',
'vue-i18n',
'vue-router',
'v-clipboard'
])
.sass('resources/sass/app.scss', 'public/css');
if (mix.inProduction()) {
mix.version()
mix.extract([
'vue',
'axios',
'vue-axios',
'vue-i18n',
'vue-router',
'v-clipboard'
])
}