Closed jdiderik closed 1 year ago
I have bundled a single typescript declaration file in v0.3.4.
Include the path to the declaration file in your jsconfig.json
:
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
},
"include": [
"src",
"node_modules/construct-ui/lib/cui.d.ts" <------
]
}
Tkan you @vrimar very much, this works out great! Much appriciated
I have been struggling to get intellisense working (autocomplete) in VSCode when using the construct-ui.min.js as an include in my HTML file, while using modern modules in the rest off the application.
For example, when in the code below you type: 'CUI.' the autocomplete should prompt options, like Button, ButtonGroup etc.
file: /modules/myView.js
This works as expected when using
import * as CUI from "construct-ui"
But this then fails in the browser, since it can't resolve NodeJS module references like this and you would need a compiler (like parceljs, rollup, babel etc.) which we do not want (which will bloat the module file (that are conditionally imported by the browser)Any thoughts on this? how to setup jsconfig.json and/or package.json and/or tsconfig.json and/or globals.d.ts or anything... cannot seem to figure this one out.