Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

File paths passed to Tailwind CSS are not escaped

オープン
#1,034 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

bug
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?.strictScanContentPaths might become unnecessary.

Logs

主要言語
TypeScript
スター
1.9k
フォーク
192
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nuxt-modules/tailwindcss のほかの issue

nuxt-modules/tailwindcss の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。