Skip to content

Sandbox apps render without Tailwind styles (prompt blocks config files) #130

@huzaifasad

Description

@huzaifasad

Problem

When generating sandbox apps (Vercel + e2b.dev), TailwindCSS classes were included in code but styles were not applied.
The root cause is in the system prompt: it explicitly instructs to never generate tailwind.config.js or postcss.config.js.

Steps to Reproduce

  1. Generate a sandbox app that uses TailwindCSS classes.
  2. Deploy to sandbox (Vercel/e2b.dev).
  3. The output shows plain HTML with no Tailwind styling.

Root Cause

The prompt prevents generation of essential config files:

tailwind.config.js
postcss.config.js

Without these files, Tailwind cannot process classes into CSS.

Solution

I fixed this by updating the prompt to allow and require Tailwind config files to be generated the first time.
Once these files exist, subsequent generations work fine and styles render correctly.

Suggestion

Update the system prompt to include Tailwind configs when needed.
Ensure the sandbox template always starts with these files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions