-
Notifications
You must be signed in to change notification settings - Fork 43
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
Support import css files #90
Comments
Thank you, @yusukebe!
Even with the current PR, that meets my demands! |
Hi @ryuapp Can you share the example using Tailwind CSS with this PR? I want to know the setting. Using PostCSS? |
@ryuapp consider importing css this way import styles from "../style.css?url"
export default jsxRenderer(async ({ title, children }) => {
return (
<html lang="en">
<head>
...
<link href={styles} rel="stylesheet" />
...
</head>
...
</html>
)
}) and updating your vite.config.ts export default defineConfig(({ mode }) => {
if (mode === "client") {
return {
plugins: [client()],
}
}
return {
plugins: [honox(), pages()],
build: {
assetsDir: "static",
ssrEmitAssets: true,
},
}
}) |
@emmanuelchucks |
I'm trying to use Remix on Hono's Vite dev-server. In that app, it can support "css side-effects imports" which is a matter of this issue: So, we may make it by referring to Remix. |
What is the feature you are proposing?
Now, in order to use tailwindcss with HonoX, we need to configure it with vite and add link tags for dev and prod envs in head.
This seems a bit troublesome.
It would be good if we could just import it as following:
If there is already a way to achieve this, please comment it.
The text was updated successfully, but these errors were encountered: