Edit: SOLVED
Hi. Fairly new to Astro and the ecosystem, so running into a few minor issues here while trying to deploy at page that makes use of Tailwind-Elements.
I got the downloaded the package, updated the config after following this process https://tailwind-elements.com/quick-start/. I've developed locally with this script include, per the instructions:
<script src="./node_modules/tw-elements/dist/js/index.min.js"></script>
This works because the file is physically there. However, this path is included when building and node_modules isn't available the dist folder.
One thing I noticed is that when I do an import i get error "document is not defined".
import 'tw-elements';
My question is therefore two-fold:
- How do I include (import) tw-elements as per the instructions?
- How do I, in general, Astrologically approach script includes like this? Feels like I might be sidestepping the build bundling or include logic here by referencing the file directly.
Thanks! ๐๐ป