Topic: error adding build configuration
I upgraded my project to mdb v6
But when i try to add configurations to angular.json, using "ng serve -c test" project served successfully but in browser i get this runtime error:
Uncaught Error: Unexpected value 'BrowserModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
This is configuration of my angular.json:
"configurations": { "production": { "fileReplacements": [{ "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" }], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true }, "test": { "fileReplacements": [{ "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" }], "optimization": false, "outputHashing": "all", "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": false, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true } }If i execute ng serve -c test I get the error, but executing ng serve is ok and works. Why using test configuration leads to the specified error?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Open
Specification of the issue
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Afshar pro commented 7 years ago
I checked docs, but problem still exists. https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/application-environments.mdDamian Gemza staff commented 7 years ago
Does this problem exist with a blank Angular project? Or not?Afshar pro commented 7 years ago
@dgemza No, doesn't existDamian Gemza staff commented 7 years ago
Could you create a reproduction repository and provide me a link, or send it to me at d.gemza@mdbootstrap.com? It would help me. Best Regards, Damian