title: Using stacks in Laravel 8
body: <p>I'm building a site using Laravel 8 and Jetstream. Jetstream is opinionated about the javascript / css framework, which is great, but I'm needing to add an external javascript library to one of my components, and I don't see anywhere to add them in the default <code>app</code> layout. So I added a stack for the css /js like this in the default app layout:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;{{ str_replace('_', '-', app()-&gt;getLocale()) }}&quot;&gt;
      &lt;head&gt;
          // head stuff
          &lt;title&gt;{{ config('app.name', 'Laravel') }}&lt;/title&gt;
  
          &lt;!-- Styles --&gt;
          &lt;link rel=&quot;stylesheet&quot; href=&quot;{{ mix('css/app.css') }}&quot;&gt;
  
          @livewireStyles
          @stack('css') // added this stack
  
          &lt;!-- Scripts --&gt;
          &lt;script src=&quot;{{ mix('js/app.js') }}&quot; defer&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body class=&quot;font-sans antialiased&quot;&gt;
          // body stuff
      &lt;/body&gt;
      @stack('scripts') // and this stack
  &lt;/html&gt;
  </code></pre>
  <p>Then in my child view that extends the app layout, I'm trying to push the js file to the js stack:</p>
  <pre><code>&lt;x-app-layout&gt;
      &lt;x-slot name=&quot;header&quot;&gt;
          &lt;h2 class=&quot;font-semibold text-xl text-gray-800 leading-tight&quot;&gt;
              {{ __('Stuff &amp; Things') }}
          &lt;/h2&gt;
      &lt;/x-slot&gt;
  
      &lt;div class=&quot;py-12&quot;&gt;
          &lt;div class=&quot;max-w-7xl mx-auto sm:px-6 lg:px-8&quot;&gt;
              &lt;div class=&quot;bg-white overflow-hidden shadow-xl sm:rounded-lg&quot;&gt;
                  &lt;x-component.stuffnthings /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/x-app-layout&gt;
  @push('scripts')
      &lt;script src={{public_path(&quot;js/mobiscroll.javascript.min.js&quot;)}}&gt;&lt;/script&gt;
  @endpush
  </code></pre>
  <p>When I view source, the js file isn't there in the child view. What am I missing? Is this the right way to add custom js / css to Jetstream or is there a better way?</p>