Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: pin tailwindcss to version 3 in artisan command make:filament-theme #15479

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

bachacode
Copy link

Description

Before the changes the artisan command make:filament-theme would install the latest tailwindcss version which is the 4.0.0 at the current date, this would create an incompatibility as filament 3 uses tailwindcss 3 and there are some breaking changes in the syntax and plugins of this newest version of tailwindcss.

Trying to run npm run build or npm run dev with tailwindcss 4.0.0 installed would result in an error like this:

[vite:css] Failed to load PostCSS config (searchPath: D:/folder/subfolder/filament-project): [Error] Loading PostCSS Plugin failed: Package subpath './nesting' is not defined by "exports" in D:\folder\subfolder\filament-project\node_modules\tailwindcss\package.json

Error: Loading PostCSS Plugin failed: Package subpath './nesting' is not defined by "exports" in D:\folder\subfolder\filament-project\node_modules\tailwindcss\package.json

(@D:\folder\subfolder\filament-project\postcss.config.js)
    at load (file:///D:/folder/subfolder/filament-project/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:33602:11)       
    at file:///D:/folder/subfolder/filament-project/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:33627:16
    at Array.map (<anonymous>)
    at plugins (file:///D:/folder/subfolder/filament-project/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:33626:8)     
    at processResult (file:///D:/folder/subfolder/filament-project/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:33696:14)
    at file:///D:/folder/subfolder/filament-project/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:33826:14
file: D:\folder\subfolder\filament-project\resources\css\filament\admin\theme.css

Functional changes

  • Updated the artisan command make:filament-theme to explicitly install tailwindcss@3
  • Ensures compatibility and avoids potential breaking changes from future versions

…heme"

- Updated the install command to explicitly use tailwindcss@3
- Ensures compatibility and avoids potential breaking changes from future versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant