'Whats the equivalent of "import 'some-module';" in vite?

I have just converted my webpack based project to vite, most of the stuff is working fine except the places where the vue component is calling some js module globally via import statement.

// my-component.vue
<script>
import $ from 'jquery';
import 'jquery-resizable-dom';

export default() {
    name: 'mycomponent',
    created() {
        this.$refs.el.resizable();
    }
}
</script>

The above code is working fine in webpack version but its throwing error in vite:

el.resizable is not a function

How I can import a jquery module globally in vite env?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source