thisbeyond / solid-select

The Select component for Solid.
https://solid-select.com
MIT License
181 stars 17 forks source link

0.7.0 Installation windi.css resolution issue #8

Closed timothyallan closed 2 years ago

timothyallan commented 2 years ago

Heya, just did a fresh install, and simply doing npm run dev on my basic Tailwind Solid Template app with an import { Select } from '@thisbeyond/solid-select'; gets me:

[vite] Internal server error: Failed to resolve import "virtual:windi.css" from "node_modules/@thisbeyond/solid-select/dist/source/index.jsx". Does the file exist?

Possibly relevant deps are:

    "vite": "^2.8.6",
    "vite-plugin-solid": "^2.2.6",
    "solid-js": "^1.3.13",
martinpengellyphillips commented 2 years ago

Ah, yeah - this is because we export the 'source' for use in other Solid project builds, but you won't necessarily have WindiCSS to generate the stylesheet.

I think I can handle this by just removing the offending line as part of the build process - I'll give that a go.

Longer term there is likely a better way to manage the styling in general (I currently provide optional default styles that can be imported easily, but can also be ignored entirely if desired).

timothyallan commented 2 years ago

Aha, it's not a bundled output, got it. Okay, will sort out how/if I can install WindiCSS with my current Tailwind setup. Thanks!

martinpengellyphillips commented 2 years ago

Just for clarity - there is a bundled output as well (dist/esm), but because there is also the 'solid' export of the JSX source (as seems to be convention for Solid libraries) it defaults to that when used in another Solid project.

I've just released 0.7.1 which should fix the issue for you with no need to add WindiCSS to your setup. Please test and let me know!

timothyallan commented 2 years ago

0.7.1 seems to have fixed it up, nice one!