• symfony

    How to add custom css file in symfony

    1. check for node installed or not [node -v] if not install it.
    2. composer require symfony/webpack-encore-bundle
    3. npm install webpack-notifier
    4. composer require symfony/asset
    5. create a file in public/style/style.css
    6. call the css file in base.html.twig file with code as follow
              {% block stylesheets %}          
                <link rel="stylesheet" href="{{ asset('style/style.css') }}" >
            {% endblock %}
    • npm run dev