ainsley_clark's avatar

Minify & Compile Page Specific Scripts

Hi all,

I currently have some page specific scripts using @push and yielding them in my main app view like so:

Page view:

@push('scripts')
<!-- =====================
    Page JS (Place in <script></script> tags)
    ===================== -->
<script>alert('doing something');</script>
@endpush

Main app view:

@stack('scripts')

Im wondering if there is a way to compile these page specific scripts via babel for es5 support and minify them?

Any ideas? Thanks in advance.

0 likes
0 replies

Please or to participate in this conversation.