Topic: Component compiling problem
rallyup pro answered 7 years ago
Damian Gemza staff commented 7 years ago
Could you show me this loader?rallyup pro commented 7 years ago
My loaders configuration for styles look like this: { test: /.component.scss/, use: [ { loader: "to-string-loader" }, { loader: 'css-loader' }, { loader: "sass-loader", options: { fallback: 'css-loader' } }] }, { test: /.css$/, use: ExtractTextPlugin.extract(["to-string-loader", "css-loader"]) }, { test: /.scss$/, exclude: /.component.scss$/, use: ExtractTextPlugin.extract(["to-string-loader", "css-loader", "sass-loader"]) }, Here it is. So *.component.scss are loaded/cached via angular and rendered as tag. For other styles i have bundled *.scss file.FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Damian Gemza staff commented 7 years ago
Dear rallyup, Are you getting this error while ng serve / ng build or in which situation? Which compiler are you using to compile your project? Best Regards, Damianrallyup pro commented 7 years ago
Hi Damian, we aren't using angular CLI.Project is hosted via ASP.NET Core so we see this error when running project on IIS express or published to local iis. We are using angular-compiler 5.2.1. I thought that might be an webpack configuration problem so i can provide you webpack config we using if needed.Damian Gemza staff commented 7 years ago
Dear Rallyup, For ASP.Net configuration, please read our tutorial: https://mdbootstrap.com/angular/5min-quickstart/ . For now, MDB Angular is not fully compatible with ASP.Net Core applications. You cannot create an app from Angular Template in Visual Studio, because this template haven't got .angular-cli.json file. This file is needed for now for proper use of MDB Angular. If you'll create an app with our tutorial, everything should works just fine. Best Regards, Damian