--prod build error


#1

Couldn’t resolve resource ./app.component.scss relative to src/app/ConstantComponent.ts

image

$ ionic info

cli packages: (C:\Users\Pradeep\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.10
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v8.11.3
npm  : 6.0.1
OS   : Windows 8.1

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

#2

What is ConstantComponent doing with app.component.scss?.


#3

Constant component is the file where I have set the url for APIs


#4

A) That’s a bad idea. Components are for interacting with the user, not storing constants. Constants go in service providers or other utility files.

B) You still didn’t answer the question. What is it doing with the app component’s scss file?