Nous allons commencer par installer Boostrap AwesomeFonts avec importmap:require.
Ici, on va chercher Bootstrap (CSS) le JS de Bootsrap et le CSS de AwesomeFonts :
php bin/console importmap:require bootstrap
php bin/console importmap:require bootstrap/dist/js/bootstrap.bundle.min.js
php bin/console importmap:require @fortawesome/fontawesome-free/css/all.css
Puis il faut dire à Symfony d'utiliser tout ce petit monde.
Tout se passe dans app.js :
import 'bootstrap/dist/css/bootstrap.min.css';
import '@fortawesome/fontawesome-free/css/all.css';
import './styles/app.css';
import 'bootstrap/dist/js/bootstrap.bundle.min.js';
import './bootstrap.js';
Pour info : la dernière ligne import './bootstrap.js'; ne concerne pas Bootstrap 5.3 mais Stimulus.
Bootstrap 5.3 devrait être fonctionnel dans votre projet Symfony.
Olivier Prieur
Geek quinqua nivernais fan d'ovalie, de musique, de linuxeries et de Net.
Portfolio : https://www.olivierprieur.fr
Il n'y a actuellement aucun commentaire pour cet article