How to achieve intellisense with libraries defined in import maps?
zachsa opened this issue · comments
Currently I have an importmap with, say, @mui/material
specified along with all indirect deps, etc. This is quite a nice development environment - I can write React directly in a .html
file (using my esm-x library). However I only get intellisense if I install libraries into node_modules (at least I assume that's where types how how it works).
So I still have to have a node-based development environment, and work with libraries via package.json. Is there any way around this?
Maybe jspm install
downloaded type def files (if they are available) to some VS Code specific cache that VS Code would check if node_modules didn't exist?
Is there a standard way for pointing to type definitions in package.json?
What about a VS Code JSPM plugin that lazily tried to load type defs of imports based on the "types" field in package.json? Then I could get autocomplete for @mui/material
just by having an importmap that referenced @mui/material
Dropping this here, but there is a plugin for monaco for something similar. Not sure if there is a vs-code wrapper for the same 🤔
https://github.com/lukasbach/monaco-editor-auto-typings
Thanks @JayaKrishnaNamburu. Is that something I could look to using right away?
I couldn't find any vs-code plugin that built a wrapper around this monaco plugin yet 😅. So no t yet, will keep looking if i come across something with vscode 👍