Relative Content

Tag Archive for javascripthtmlnpmimportlangchain

How do I import JS npm packages into HTML?

I want to use langchain in a JS script that is embedded into an HTML page. However, when using Flask to run the HTML page, the packages don’t import into the JS script. Same issues when using inline JS. They work fine when the JS file is run by itself (not through HTML). How can I import langchain (or JS npm packages in general) into an HTML page? Is there an importmap for langchain that I can use (like there is for google/generative-ai)?