D
Deno

help

Upgraded to Fresh 1.60 but TailwindCSS not rendering

Ttas1312/3/2023
I updated my codebase to Fresh 1.60 using TailwindCSS instead of twind. When I pushed the code to Deno Deploy, the CSS didn't render. I created a separate repository with a brand new Fresh 1.60 install and deploy it as well and it also didn't render the CSS. Is there a way to fix this? Thanks in advance.
DAHDeno AI Helper12/3/2023
It seems you've encountered an issue with Tailwind CSS not rendering after upgrading to Fresh 1.6. The documentation mentions that Fresh 1.6 introduces first-class support for Tailwind CSS, moving away from Twind, which is now deprecated. This change should provide a more polished editor experience and performance benefits, as Tailwind CSS only needs to generate CSS once on deployment, rather than on the fly with Twind. Here are a few steps you can take to troubleshoot the issue: 1. Ensure Tailwind CSS is set up correctly: Since Fresh 1.6 uses the Tailwind CSS npm package, make sure you have followed the guide in the Fresh documentation to switch from Twind to Tailwind CSS. This includes setting up ahead-of-time builds for your project. 2. Check for build errors: When deploying to Deno Deploy, look for any build errors that might indicate a problem with the Tailwind CSS setup. 3. Verify asset serving: Fresh 1.6 gives priority to pre-generated assets when serving them if it encounters the same file in _fresh/static. Ensure that your Tailwind CSS is being generated correctly and that the assets are placed in the appropriate directory. 4. Inspect the deployed site: Use the browser's developer tools to inspect the network requests and ensure that the Tailwind CSS file is being requested and loaded correctly. Check for any 404 errors that might indicate the CSS file is not being found. 5. Review the Fresh 1.6 release notes: The documentation provides details on the new features and changes in Fresh 1.6. Review the release notes to ensure that all necessary steps for the upgrade have been followed. If you've gone through these steps and the issue persists, it might be helpful to look at the specific configuration of your Fresh project or any
DAHDeno AI Helper12/3/2023
customizations that might be affecting the CSS rendering. Since the documentation does not provide a direct solution to this issue, you may need to experiment with the setup or seek further assistance from the Fresh community or maintainers. 🦕
Kking8fisher12/3/2023
Have you set AOT builds according to #7 in https://fresh.deno.dev/docs/examples/migrating-to-tailwind ?
Migrating to Tailwind | Fresh docs
Migrating from twind to Tailwind CSS
Aabi12/4/2023
Is AOT build a requirement? Just curious, I’m also learning Fresh rn
Mmarvinh.12/4/2023
for the tailwind plugin yes for twind plugin no

Looking for more? Join the community!

Recommended Posts
Optimize for Prod simple static vanilla JS script - WebServer App with Oak + DEJSUsing DEJS to render views. Those views are served by Oak, according to the defined routes. What is ReadableStream passed to an island component argument becomes an empty objectI am passing `ReadableStream` to an island component argument becomes an empty objectdeno.jsonc "unstable" format?I added this entry to my `deno.jsonc`: ```json "unstable": [ "broadcast-channel", "ffi", "fs"Signal value not updating from inside of `for await of` loop inside of an IIFE```ts // routes/connect.tsx import type { FunctionComponent } from 'preact' import type { PageProps Pricing Question - Is my pro account applied to my Orgs?Just recently purchased a pro account cause I thought a project would benefit from the extra firepowRecommended `denoland/deno` contributor editor setupI have a problem with deno trying to redefine itself via random `declare namespace Deno { ... }` thrHow to enable "WebSocketStream" using deno.json fileI want to enable "WebSocketStream" using deno.json's "unstable" array option.subhosting to run user scriptsI want to allow users to run arbitrary scripts, but they don't need to be available as endpoints, soRemove Old DeploymentsIs there a way to remove old preview deployments, or do they expire at some point? There are a numbeCompiled program cannot write to fileI made a program that can download the latest version of papermc or velocity. and it does download iHow to monkey patch an installed third party deno module.Is it possible to monkey patch an installed third party deno module?? I want to overwrite a functionMongoDB connection error on Deno DeployHello, I've a project running on Deno Deploy using Deno Fresh and I need to write information beinDeno cron instrumentationWe at Sentry are looking at adding automatic instrumentation for Deno crons: https://github.com/getsWebgl2 in Deno i.e. for unit testingnodejs has this challenge that there is no way to run webgl2 (or webgpu), i.e. for unit testing. The