SolidJSS
SolidJS3y ago
5 replies
romanobro

using vanilla js with import?

I am playing around with ways to visualize data and I would like to be able to use vanilla js to do so. I understand that I could do things with onmount and other solid provided techniques but I thought it would be cool to try to import a js file. It did work, but it seems to have been "minified" or whatever happens when your code is built for production. The image provided is actually a whole javascript file that seems to have been stuck inside of index-05a...js , and it works as intended until you try to do anything that interacts with the dom, at which point it errors and says document is undefined. So, is there an easy workaround to be able to use my js file in solid or should I stick to using solid as intended? Thank you
Screen_Shot_2023-06-09_at_1.27.20_AM.png
Was this page helpful?