https://stackblitz.com/edit/angular-ngx-daterangepicker-material-build-problem
This is working while using ng serve
but
I build the entire angular app using ng build --prod
and the issue was the following
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
and as the stackblitz exports doesn't contian environments directory you should resolve the issue either by adding such files or comment this lines on angular.json
second problem was for old version of angular dependencies which stackblitz offers, so I updated them on packages.json
to what ng new myApp
generates.
"@angular/animations": "~9.0.1",
"@angular/common": "~9.0.1",
"@angular/compiler": "~9.0.1",
"@angular/core": "~9.0.1",
"@angular/forms": "~9.0.1",
"@angular/platform-browser": "~9.0.1",
"@angular/platform-browser-dynamic": "~9.0.1",
"@angular/router": "~9.0.1",
"@angular-devkit/build-angular": "~0.900.2",
"@angular/cli": "~9.0.2",
"@angular/compiler-cli": "~9.0.1",
"@angular/language-service": "~9.0.1",
"typescript": "~3.7.5"
finally it successfully build using ng build --prod