-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Link
component for external (built) css
#181
feat: add Link
component for external (built) css
#181
Conversation
src/server/components/link.tsx
Outdated
import type { FC } from 'hono/jsx' | ||
import type { Manifest } from 'vite' | ||
|
||
type Options = { manifest?: Manifest; prod: boolean } & JSX.IntrinsicElements['link'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should prod
be prod?
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right! I fixed it!
Hi @mika-f This is a super cool feature! I'd like to merge it, but I've left one comment. Check it! |
Hey @ryuapp @bruceharrison1984 ! What do you think of this feature? Will it resolve #90, though we still need to add a path to the CSS file in |
Great work. I like this feature because this simplifies a renderer file.
Partially solve it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you for the comment.
Yeah, I also think so. I'm not sure how we can implement it. But for example, if we can write the following, it will be great: import tailwind from '@hono/vite-tailwind-css'
export default defineConfig(({ mode }) => {
return {
plugins: [honox(), pages(), tailwind()]
}
}) |
Looks good! I'll merge this and release the new version which includes this change later. Thank you for your contribution! |
Motivation
For example, you may want to use TailwindCSS for styling HonoX components. Currently, it is possible to develop using the
<link />
tag, but the build result does not contain a unique value such as a file hash, which can lead to unintended caching.This PR addresses such a use case.
Example
As an example, we are considering the following use cases: