Closed vladdu closed 4 years ago
That's why I recommend using the serve
package.
yarn add -g serve
serve
Run serve
from the root of your OUTPUT folder (where index.html is located).
I saw that afterwards, but it still doesn't work. I needed to use "yarn global add serve" and manually add ~/.yarn/bin to $PATH. After that, the components are shown completely unstyled.
I realize that using relative links makes things a bit more complicated and probably not worth it, because it's more than removing the initial /
Hmm, ok, so I needed addTailwindCss: it isn't clear what that option does: add a link where? I thought initially it's only a link to their site.
Sorry, the addTailwindCss
transformer adds the following to each component HTML file. If you want to use the Inter font (the same as on the tailwindui.com site), add the userInter
transformer.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css" />
Also, you may want to upgrade to v2.3. The component code no longer includes the Alpine.js markup, so it won't be interactive on your local copy. The update adds an option to ensure that it gets the the version with Alpine.
Thanks. I created a PR to make it clear how to have styled components when served via serve
This makes it hard to just browse the files, a server is needed...