I just moved to angular-cli 1.0.0-beta.11-webpack.2
There are so many annoying things but the biggest problem which I`m facing is with external css files (probably I will have the problem with js files too).
In my project is used Angular2 material and the menu component
is requiring the overlay.css
. When I am including it in index.html
:
<link href="vendor/@angular2-material/core/overlay/overlay.css" rel="stylesheet">
And after ng serve
or ng build
the overlay css files are missing in the dist folder.
There is as issue on angular-cli github
. I did everything exactly how it's mentioned but is still not working.
I crated an assets
folder and styles.css
file in
- src
- src/app
and my angular-cli.json
files look like:
{
"project": {
"version": "1.0.0-beta.11-webpack.2",
"name": "cli-webstorm"
},
"apps": [
{
"root":"src",
"assets":"assets",
"main": "src/main.ts",
"tsconfig": "src/tsconfig.json",
"mobile": false,
"styles": "styles.css",
"environments": {
"source": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"dev": "environments/environment.dev.ts"
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "config/protractor.conf.js"
}
},
"test": {
"karma": {
"config": "config/karma.conf.js"
}
},
"defaults": {
"prefix": "app",
"sourceDir": "src",
"styleExt": "css",
"prefixInterfaces": false,
"lazyRoutePrefix": "+"
}
}
I would like to ask how can I include an library css files(3rd part css) in my project in a way that I can use the benefits of angular-cli webpack
?