Hi there,
so I'm looking to implement autocomplete.js in my solidJS component in AstroJS, and have run into a problem in how to load an initialise the JS. In my SolidJS component, I have:
import autoComplete from "@tarekraafat/autocomplete.js";
import '@tarekraafat/autocomplete.js/dist/css/autoComplete.css';
export default function QueryString({setFields, fields, classesAndProps}){
const config = {...}
const autoCompleteJS = new autoComplete({ config });
But it throws:
[plugin:@astrojs/solid-js] document is not defined
/blah/source/model/node_modules/@tarekraafat/autocomplete.js/dist/autoComplete.js:149:42
How do I load and initialise this library, when it depends on the window object, which seems not available? I'll need access to the autoCompleteJS object in my SolidJS component.
Hope someone can help. Thanks!!