Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment folder outside Angular #24

Open
newuser44 opened this issue Feb 16, 2018 · 0 comments
Open

Environment folder outside Angular #24

newuser44 opened this issue Feb 16, 2018 · 0 comments

Comments

@newuser44
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant