Reputation: 2267
I'm a big fan of bootstrap, hailing from the php world. I've recently started on angular2 and asp.net core. I notice a vendor.css file which when opened has bootstrap stuff in it as well.
The npm already has bootstrap installed and there is the bootstrap.min files in the wwwroot lib folder.
I'm confused with this file. What is it for? Isn't it redundant with bootstrap?
Upvotes: 1
Views: 1989
Reputation: 57939
When we publish an app, all the files in the wwwroot folder are copied. Then, if you need load a .css in the index.html, or a dbs, or a images or.. you must
But in angular the best aproach is have an unique.css. This css are the union of css in your component+ css defined globally.
In angular-cli we use the angular-cli.json file to add .css globally (in styles)
"styles": [
"app/css/bootstrap.css",
"../node_modules/font-awesome/css/font-awesome.css",
"styles.css"
],
In .net Core we use webpack.config.vendor to add .css globally (in nonTreeShakableModules)
const nonTreeShakableModules = [
'bootstrap-css-only/css/bootstrap.css',
'font-awesome/css/font-awesome.css',
'es6-promise',
'es6-shim',
'event-source-polyfill'
];
Moreover, In .net Core we can use vendor.css too
Upvotes: 2
Reputation: 5265
vendor.css is where you require all the third party css files.
All of these files will be inlined inside dist/vendor.css
.
As per Angular CLI documentation.
Upvotes: 1
Reputation: 12174
In an Angular2 project, there are other vendor packages that use the css file.
Upvotes: 1