-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
AssetMapper / TailwindBundle compilation #475
Comments
Good idea! We could update the Docker entrypoint to check if the related packages are installed by doing a |
But the best would probably to update the Flex recipes to run these command automatically when installing these packages thanks to Composer scripts when needed. |
The recipe of AssetMapper have the install command : https://github.com/symfony/recipes/blob/main/symfony/asset-mapper/6.4/manifest.json#L13 Example with the symfony/demo : https://github.com/symfony/demo/blob/main/composer.json#L96-L97 |
@dunglas I think we can simply check if the I propose to start without any bundle support and see after how we can do. For a first step, in @Spomky WDYT ? |
Sounds sensitive to me! |
Hi @maxhelias, It looks good to me too. No need for anything in |
The What I have done is to add these commands to the Makerfile so assets are compiled before building the Docker image: prod_build: ## Builds Tailwind assets and the Docker images for production environment
@$(SYMFONY) tailwind:build --minify
@$(SYMFONY) asset-map:compile
@$(DOCKER_COMP) -f compose.yaml -f compose.prod.yaml build --pull --no-cache Maybe another option would be to remove RUN set -eux; \
mkdir -p var/cache var/log; \
composer dump-autoload --classmap-authoritative --no-dev; \
composer dump-env prod; \
composer run-script --no-dev post-install-cmd; \
php bin/console tailwind:build --minify; \
php bin/console asset-map:compile; \
rm -rf assets/; \
chmod +x bin/console; sync; |
Hi @dunglas,
Many thanks for the last update of this repository. It works like a charm and I was able to run a demo quite easily.
The only problem I encountered was the absence of compiled assets. I recently turned to AssetMapper and TailwindBundle and needed to run the folowing lines:
In dev mode:
php bin/console importmap:update php bin/console tailwind:build # --watch
In production
I am wondering if it is possible to conditionally call these commands (TBH I don't know how to determine they exist).
WDYT?
The text was updated successfully, but these errors were encountered: