Minify & Compile Page Specific Scripts

Posted 1 month ago by ainsley_clark

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.

Please sign in or create an account to participate in this conversation.