I am trying to use jQuery UI in StackBlitz.
I am also trying to install it as a dependency and without a script tag.
I understand that I have to add @types/jquery and @types/jqueryui as dependencies.
But when I add this in the index.ts
import $ from "jquery"; import "jqueryui"; I get the error: "jQuery is not defined"
31 Answer
This code seems to do the trick:
import $ from "jquery"; declare var global: any global.jQuery = $; import "jqueryui"; Here is a screenshot of the dependencies:
1
