Intergration issue

Hi Everyone,
I am writing like this import ‘select2/dist/js/select2’; in my client js file. After installing select2 from npm. After compilation generating the script file. I am adding that static file in html page. Its loading the file. but after running $(’.test’).select2(); I am getting below error. Can some one help me on this one.

ERROR:
common-vendors.bundle.js:25 Uncaught
TypeError: $(…).select2 is not a function