Update webpack, extract vendor librarys

This commit is contained in:
Daniel Supernault 2019-06-10 20:56:14 -06:00
parent 44afcc715d
commit b42db89212
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
4 changed files with 29 additions and 9 deletions

View file

@ -34,6 +34,8 @@
@yield('content')
</main>
@include('layouts.partial.footer')
<script type="text/javascript" src="{{ mix('js/manifest.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/vendor.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/app.js') }}"></script>
@stack('scripts')
</body>

View file

@ -47,6 +47,8 @@
@endif
</main>
@include('layouts.partial.footer')
<script type="text/javascript" src="{{ mix('js/manifest.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/vendor.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/app.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/components.js') }}"></script>
@stack('scripts')

View file

@ -30,6 +30,8 @@
<main id="content">
@yield('content')
</main>
<script type="text/javascript" src="{{ mix('js/manifest.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/vendor.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/app.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/components.js') }}"></script>
@stack('scripts')

32
webpack.mix.js vendored
View file

@ -1,5 +1,9 @@
let mix = require('laravel-mix');
mix.options({
purifyCss: true,
});
/*
|--------------------------------------------------------------------------
| Mix Asset Management
@ -11,6 +15,16 @@ let mix = require('laravel-mix');
|
*/
mix.sass('resources/assets/sass/app.scss', 'public/css', {
implementation: require('node-sass')
})
.sass('resources/assets/sass/appdark.scss', 'public/css', {
implementation: require('node-sass')
})
.sass('resources/assets/sass/landing.scss', 'public/css', {
implementation: require('node-sass')
}).version();
mix.js('resources/assets/js/app.js', 'public/js')
.js('resources/assets/js/activity.js', 'public/js')
.js('resources/assets/js/components.js', 'public/js')
@ -43,13 +57,13 @@ mix.js('resources/assets/js/app.js', 'public/js')
// Loops Component
.js('resources/assets/js/loops.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css', {
implementation: require('node-sass')
})
.sass('resources/assets/sass/appdark.scss', 'public/css', {
implementation: require('node-sass')
})
.sass('resources/assets/sass/landing.scss', 'public/css', {
implementation: require('node-sass')
})
.extract([
'lodash',
'popper.js',
'jquery',
'axios',
'bootstrap',
'vue',
'readmore-js'
])
.version();