I'm developing an ES6 application and doing build with Webpack. This application will be in a template that already imports jQuery via <script src...></script>
.
How would I do to import from this file, jQuery to use it in my application? I have tried using jQuery $ in the application but it gives error:
$ is not defined
But I can not get this import from the template because it is shared by other applications.
In HTML I have the following code snippet:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
My JavaScript:
class Products {
constructor() {
this.item = $('.prodcut-item')
}
}