Feature request: Ability to include/exclude paths for compilation

Created on 2 March 2025, about 2 months ago

Problem/Motivation

We have enabled Tailwind JIT on the Gin admin theme, but we are unable to edit the settings for fields on the form display page for our paragraphs when 'Compile HTML requests' is enabled.

Steps to reproduce

Enable Tailwind JIT 'Compile HTML requests' on the Gin admin theme. Visit the 'Manage form display' page for a paragraph and notice that the gear icon and field settings summaries do not show.

Proposed resolution

Is it possible to restrict the paths for where the compilation happens? In our case, we only want it to run the JIT compiler on the node add/edit form so the preview of our paragraphs are rendered the same as they are on the front end theme.

My guess is that you did not intend for the module to be used on admin themes, but perhaps it could be supported if a field to was added to the Tailwind JIT settings to allow admins to include/exclude certain paths for compilation.

Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇳🇿New Zealand hitfactory

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @hitfactory
  • 🇦🇹Austria hudri Austria

    This is currently not possible. Technically it is possible to use Tailwind JIT with admin themes too. But I myself have stopped doing this for performance reasons, because especially on the node edit form with Paragraphs it was unbearingly slow. (Paragraphs is doing a lot of Ajax calls, and every single Ajax call was Tailwind compiled, so every single click took 2-3 seconds).

    Therefore I would not recommend this approach, and currently have no plans to implement this. MR's welcome though :-)

    The workaround I did for my projects was creating a gin_custom.css : First I exported all config. Then I created a static CSS file, using the config/sync/ directory and the my_theme/templates/ directory as content source for the Tailwind compiler to create that static gin_custom.css file. This is currently the best tradeoff (it is very fast, but includes only pre-configured style (e.g. in your CKeditor), but no on-the-fly styles created by your editor).

Production build 0.71.5 2024