I encountered an error message that reads:
Uncaught TypeError: $(...).dialog is not a function
The issue appears to be arising from importing jquery twice, and I am struggling to find a solution.
Additionally, the error references bootstrap in the following excerpt:
PopupSelectCard.ts:44 Uncaught TypeError: $(...).dialog is not a function
at Object.PopupSelectCard (PopupSelectCard.ts:44)
at Object.defineProperty.value (Index.ts:21)
at __webpack_require__ (bootstrap 92cf533…:19)
at Object.defineProperty.value (bootstrap 92cf533…:62)
at bootstrap 92cf533…:62
PopupSelectCard @ PopupSelectCard.ts:44
Object.defineProperty.value @ Index.ts:21
__webpack_require__ @ bootstrap 92cf533…:19
Object.defineProperty.value @ bootstrap 92cf533…:62
(anonymous) @ bootstrap 92cf533…:62
Below is my webpack.config.js configuration:
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
...
In my TypeScript file, this is how I import jquery:
import * as $ from "jquery";
import 'jquery-ui';
If I exclude the jquery import, compiler errors occur with the message:
Cannot find name '$'.
Can anyone provide guidance on resolving this issue?