title: How to use third party plugin in rails 6? Using webpacker
body: <p>How can I use the the third party plugin via webpacker. I dont want to use cloudfare external link in application.html.erb.</p>
  
  <p><strong>Why means</strong>, I just want to compile all the plugin while application loading for the initial time.</p>
  
  <p>Thanks in advance :)</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;title&gt;&lt;%= yield(:title).present? ? yield(:title) : 'Tryblank' %&gt;&lt;/title&gt;
      &lt;meta name="description" content="&lt;%= yield(:description).present? ? yield(:description) : 'Tryblank' %&gt;" /&gt;
      &lt;%= csrf_meta_tags %&gt;
      &lt;%= csp_meta_tag %&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /&gt;
      &lt;%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %&gt;
      &lt;%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %&gt;
      &lt;script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.12/css/lightgallery.min.css" /&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.12/js/lightgallery.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/lg-thumbnail/1.1.0/lg-thumbnail.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.1/jquery.validate.js" &gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/css/bootstrap-datepicker3.standalone.min.css" /&gt;
      &lt;script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/js/bootstrap-datepicker.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;%# &lt;p class="notice"&gt; notice&lt;/p&gt; &lt;p class="alert"&gt;alert&lt;/p&gt; %&gt;
      &lt;%= yield %&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>application.js</p>
  
  <pre><code>require("@rails/ujs").start()
  require("turbolinks").start()
  require("@rails/activestorage").start()
  require("channels")
  require("jquery")
  
  import '../stylesheets/style'
  import './default.js' 
  import './bootstrap_custom.js'
  import './side_menu.js.erb'
  //import './sweetalert.js'
  import './business_hours.js'
  import './admin.js'
  import './services.js'
  import './user_service.js'
  </code></pre>