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') @yield('content')
</main> </main>
@include('layouts.partial.footer') @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/app.js') }}"></script>
@stack('scripts') @stack('scripts')
</body> </body>

View file

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

View file

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

32
webpack.mix.js vendored
View file

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