File paths passed to Tailwind CSS are not escaped
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- nuxt, tailwindcss, typescript
- 領域
- frontend
調査の方向性
Start by tracing how the concrete path pages/[request-id]/index.vue enters Tailwind's content configuration, and compare it with intentionally provided glob patterns. Check the interaction with moduleOptions.experimental?.strictScanContentPaths. Done means utilities used in files with glob-special characters are generated by Tailwind's scan.
索引モデルが issue の本文から書いたものです。
説明
Environment
- @nuxtjs/tailwindcss: v6.14.0
- tailwindcss: v3.4.18
- nuxt: v3.13.0
Reproduction
No response
Describe the bug
It looks like @nuxtjs/tailwindcss collects page file paths and passes them to Tailwind CSS as content entries (which are treated as glob patterns).
Since these are actual file paths, they should be escaped so they are not interpreted as fast-glob patterns. However, they currently appear to be passed without escaping.
As a result, some files are excluded from Tailwind’s content scanning. For example, the following Nuxt dynamic route file is not scanned:
pages/[request-id]/index.vue
Because Tailwind’s content configuration is interpreted as fast-glob patterns, characters like [] are treated as pattern syntax rather than a literal file path.
Expected behavior
Files under Nuxt’s pages directory should be scanned by Tailwind even if the path contains characters with special meaning in glob patterns (e.g. []).
Actual behavior
Files under dynamic route directories (e.g. pages/[request-id]/...) are excluded from Tailwind’s scan, and utilities used only in those files are not generated.
Additional context
Proposed fix
For content entries that are concrete file paths (as opposed to intentionally provided glob patterns), escape them using fast-glob’s path escaping (e.g. escapePath(...)) before passing them to Tailwind. This ensures paths containing [] are treated as literal file paths.
Tailwind’s docs also mention that content entries are treated as glob patterns:
https://v3.tailwindcss.com/docs/content-configuration#configuring-source-paths
Notes
-
If the module passes other literal file paths (not patterns) to Tailwind besides
pages, those may also need escaping. -
With correct escaping,
moduleOptions.experimental?.strictScanContentPathsmight become unnecessary.
Logs
- 主要言語
- TypeScript
- スター
- 1.9k
- フォーク
- 192
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nuxt-modules/tailwindcss のほかの issue
-
Version 6オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
nuxt-modules/tailwindcss#1042 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
nuxt-modules/tailwindcss#1039 · コメント 2 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
nuxt-modules/tailwindcss#1033 · コメント 1 件 ·
-
question
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
nuxt-modules/tailwindcss#1031 · コメント 7 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
nuxt-modules/tailwindcss#1003 · コメント 10 件 · リアクション 1 件 ·
nuxt-modules/tailwindcss の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
callstackincubator/rozenite#518 ·
メンテナーはふだん 1 日以内に返信
-
Area/Workflow Priority/Blocker Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
wso2/product-integrator#2622 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
area:bash bug has repro platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anthropics/claude-code#98644 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
allure-framework/allure-js#1603 ·
メンテナーはふだん 1 日以内に返信