The default installer copy/paste a skeleton for a website stylized with Tailwind CSS.
To update it, just edit app.js, app.css, directly the tailwind configuration or the vite.config.js.
Then run the build:
npm install && npm run build
# OR for development with hot reload:
npm run dev
If you want to change the default location for assets, just edit ./config/packages/pushword.yaml and configure apps.0.assets (eg)
Bundle templates ship inside vendor/pushword/, and Tailwind’s automatic detection never walks in there: it skips whatever your .gitignore covers. They have to be declared, which is what the app.css shipped by @pushword/js-helper does — an explicit @source does reach a gitignored path:
@source "./../../../../vendor/pushword/*/src/templates/**/*.twig";
Build your stylesheet from that file (the default vite.config.js does) and bundle templates are covered. Write your own entry point instead and you must carry the line over, relative to your own CSS file — otherwise every class a bundle template uses (the newsletter form, the conversation form, the video component) is purged and that markup renders unstyled.
One trap if you edit these lines: an @source pattern has to end on a filename. vendor/pushword/**/templates/ reads correctly and matches nothing whatsoever, silently — you only notice because the stylesheet came out smaller. A plain directory with no glob in it (@source "templates";) is walked whole and is fine; anything with a * in it needs to reach files.
If you use Tailwind classes inside page content, by default the command npm run build is run when you update a page.
May be sure this option is working by checking var/log/lastTailwindGeneration.
If not working, you may add path to bin in config:
pushword:
path_to_bin: /home/username/bin:/opt/alt/alt-nodejs16/root/usr/bin/
To disable it, add in config:
pushword:
tailwind_generator: false
Note: the assets built by tailwind can be built after page loaded.