nx/docs/generated/packages/remix/generators/setup-tailwind.json
Nicholas Cunningham d87f4c2d23
fix(remix): update setup-tailwind generator to correct import statements (#30599)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
There are two issues when we generate a remix application with ts
solutions:

1. Running the `setup-tailwind` generator with a reference project which
now is commonly with the pattern `@nx/acme` throws an error based on the
schema.
```
Property 'project' does not match the schema.'@nx/acme' should match the pattern '^[a-zA-Z].*$'.
```
2. The `tailwind.css` inside of `root.tsx` causes error with Vite.
```
app/root.tsx (9:7): "default" is not exported by "app/tailwind.css", imported by "app/root.tsx".
```




## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

The remix project should be able to be referenced similarly to how we
handle React.
The tailwind import should not throw an error.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #30343
2025-06-02 12:52:43 -06:00

39 lines
1.2 KiB
JSON

{
"name": "setup-tailwind",
"implementation": "/packages/remix/src/generators/setup-tailwind/setup-tailwind.impl.ts",
"schema": {
"$schema": "https://json-schema.org/schema",
"$id": "NxRemixTailwind",
"title": "Add TailwindCSS to a Remix App",
"description": "Setup tailwindcss for a given project.",
"type": "object",
"examples": [
{
"command": "g setup-tailwind --project=myapp",
"description": "Generate a TailwindCSS config for your Remix app"
}
],
"properties": {
"project": {
"type": "string",
"description": "The name of the project to add tailwind to",
"$default": { "$source": "projectName" },
"x-prompt": "What project would you like to add Tailwind to?"
},
"skipFormat": {
"type": "boolean",
"description": "Skip formatting files after generator runs",
"default": false,
"x-priority": "internal"
}
},
"required": ["project"],
"presets": []
},
"description": "Generates a TailwindCSS configuration for the Remix application",
"aliases": [],
"hidden": false,
"path": "/packages/remix/src/generators/setup-tailwind/schema.json",
"type": "generator"
}