title: Symfony 4 with jquery plugins and WebEncore
body: <p>I'm currently trying to bring the assets to work with an plugin for Jquery.
  But I don't get it on how to make it work the way it used to work earlier.</p>
  
  <p>First of all heres my webpack.config.js</p>
  
  <pre><code>    var Encore = require('@symfony/webpack-encore');
  
      Encore
          .setOutputPath('public/assets/')
          .setPublicPath('/assets')
          .cleanupOutputBeforeBuild()
          .enableSourceMaps(!Encore.isProduction())
          .enableVersioning(Encore.isProduction())
          .addEntry('css/bootstrap','./src/Assets/Bootstrap/scss/bootstrap.scss')
          .addEntry('js/jquery', './src/Assets/jquery-3.2.1.js')
          .addEntry('js/bootstrap', './src/Assets/Bootstrap/dist/js/bootstrap.bundle.js')
          .addEntry('js/common', './src/Assets/common.js')
          .addEntry('css/backend','./src/Assets/backend.css')
          .addEntry('css/admin','./src/Assets/admin.css')
          .addEntry('css/frontend','./src/Assets/frontend.css')
          .addEntry('css/bfcw','./src/Assets/bfcw.css')
          .addEntry('fonts/fa','./src/Assets/FontAwesome/web-fonts-with-css/scss/fontawesome.scss')
          .addEntry('fonts/fa-brand','./src/Assets/FontAwesome/web-fonts-with-css/scss/fa-brands.scss')
          .addEntry('fonts/fa-regular','./src/Assets/FontAwesome/web-fonts-with-css/scss/fa-regular.scss')
          .addEntry('fonts/fa-solid','./src/Assets/FontAwesome/web-fonts-with-css/scss/fa-solid.scss')
          .addEntry('fonts/fa-light','./src/Assets/FontAwesome/web-fonts-with-css/scss/fa-light.scss')
          .addEntry('js/growl', './src/Assets/growl/bootstrap-notify.js')
          .enableSassLoader()
          .enableSourceMaps(!Encore.isProduction())
          .cleanupOutputBeforeBuild()
          .enableBuildNotifications()
      ;
  
      module.exports = Encore.getWebpackConfig();
  </code></pre>
  
  <p>compiling works without any issues.</p>
  
  <p>But I always get the following message inside my console</p>
  
  <pre><code>bootstrap.bundle.js:6286 Uncaught ReferenceError: $ is not defined
  at Object.&lt;anonymous&gt; (bootstrap.bundle.js:6286)
  at Object../src/Assets/Bootstrap/dist/js/bootstrap.bundle.js (bootstrap.js:6377)
  at __webpack_require__ (bootstrap edfab3caa025dca10315:19)
  at bootstrap edfab3caa025dca10315:62
  at bootstrap edfab3caa025dca10315:62
  Uncaught ReferenceError: $ is not defined
  at list:108
  </code></pre>
  
  <p>I need to have the $(function(){.... within the twig templates as I need to trigger some functions from on the fly defined methods.
  I don't want to put everything into js files as some of the functions should not be publicly delivered as they are reservated for admins exclusivly etc.</p>
  
  <p>Also I don't want to include the jquery over npm / yarn as the node_modules folder should not be submited into the productive environment and it should also not be available in the webroot directory.</p>
  
  <p>I appreceate any help and will give more details, if required.</p>