A nice commit migrating away from AMD Modules to ECMAScript modules recently landed in the jQuery repo. Once published as a new release, you’ll be able to actually
import $ using the modern ES module syntax:
import $ from "jquery"; $('#message').text('Hi from jQuery!');
Handy if you’re modernizing a legacy project that still uses jQuery.
💡 Up until now I’ve been either including jQuery separately or have been relying on
webpack-merge-and-include-globally to include jQuery in my Webpack build.