ionic-environment-variables icon indicating copy to clipboard operation
ionic-environment-variables copied to clipboard

Environment folder outside Angular

Open newuser44 opened this issue 7 years ago • 0 comments

We have multiple apps and trying to not have duplicated code everything.

Trying to move as much in some higher folder and then include it in multiple apps.

Apps --Enviroments --Components --App1 tsconfig.json -- -- src/app config/webpack.config.js

I just need the webpack to see the Environments.

I changed the environment Path function to find the correct file.

var filePath = '../environments/environment' + (env === 'prod' ? '' : '.' + env) + '.ts';

I don't know if I need to change tsConfig.json file.

"paths": { "@app/env": [ "environments/environment" ] }

I'm unclear if this path is an actually path or something else?

Anytime I build I just get Cannot find module '@app/env'. in all my component files. The component files are outside the normal Angular /src/app/pages location.

newuser44 avatar Feb 16 '18 18:02 newuser44