Skip to content

Fix TailwindCSS v4 Vite build and compile assets - #211

Merged
stepanenko3 merged 2 commits into
stepanenko3:mainfrom
pawell67:fix-vite-tailwind4-build
Mar 5, 2026
Merged

stepanenko3 merged 2 commits into
stepanenko3:mainfrom
pawell67:fix-vite-tailwind4-build

Conversation

@pawell67

@pawell67 pawell67 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the Vite production build which started failing after upgrading to TailwindCSS v4 because it was trying to use Tailwind directly as a PostCSS plugin instead of via the new '@tailwindcss/vite' plugin. Included the missing 'name' attribute in package.json and the newly compiled 'dist' frontend assets. This also resolves the 'useLocalization' Vue error encountered in Nova 5.

@stepanenko3
stepanenko3 merged commit 86f3655 into stepanenko3:main Mar 5, 2026
@kichetof

kichetof commented Mar 9, 2026 •

Copy link
Copy Markdown

Hi @pawell67 this update break lines color in light theme with Nova 5.7.7 (displayed as dark instead of light).

Image

As Tailwind 4 remove class theme switch, we need to define @custom-variant dark (&:where(.dark, .dark *)); as described here

For the moment, I roll back to 4.5.0

pawell67 added a commit to pawell67/nova-command-runner that referenced this pull request Jun 26, 2026
Two pre-existing failures inherited from stepanenko3#211, unrelated to the dark mode
change but blocking this PR's checks:

- Front lint: package.json has no "type": "module", so vite.config.js loads
  as CommonJS and `require()`-ing the ESM-only @tailwindcss/vite throws
  ERR_REQUIRE_ESM under the CI Node 20.10. Rename to vite.config.mjs so Vite
  loads it as ESM. Verified: build fails under Node 20 with .js, passes with
  .mjs.

- PHP Lint (Pint): drop the superfluous `@return null|string` phpdoc on
  RunsArtisan::getArtisanRunByName() that duplicates the `: ?string` return
  type (no_superfluous_phpdoc_tags, phpdoc_trim). Verified passing with the
  repo's pint.json.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants