When incorporating a Bootstrap CSS file into an Angular project that has already been added using
yarn add <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f2909d9d868186809382b2c6dcc3dcc3">[email protected]</a>
, there are two methods to do so:
- Include the CSS file dist path as
@import
in the styles.css file. - Add the CSS file path to the
styles
section within angular.json`.
1st method:
@import "~bootstrap/dist/css/bootstrap.css";
2nd method:
"styles": [
"src/styles.css",
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
],
Both approaches are effective, but which one is the optimal choice? Is one superior over the other, or is it simply based on personal preference?