stackoverflow

View on StackOverflow

I face the same issue and this worked for me!

Install jQuery using npm

npm i jquery

Then include jQuery in one of the following ways.

Using Script tag

<script>window.$ = window.jQuery = require('jquery');</script>

Using Babel

import $ from "jquery";

Using Webpack

var $ = require('jquery')