Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Can build/run/serve scripts respect env variables? #639

Closed
josh-m-sharpe opened this issue Jan 10, 2017 · 3 comments
Closed

Can build/run/serve scripts respect env variables? #639

josh-m-sharpe opened this issue Jan 10, 2017 · 3 comments

Comments

@josh-m-sharpe
Copy link

I would like to have 'ionic [serve|emulate|run|build|etc]' all respect environment variables so that I can change how my app behaves accordingly.

I've seen a lot of posts that access the current runtime env by 'process.env.VAR_NAME' but it's unclear if that's supported inside ionic's webpack process.

Thanks!

@danbucholtz
Copy link
Contributor

This is a bit of a gap in our process right now that we will resolve in the coming months. For now, please use webpack or rollup's plugin for environment variables. You may also need to add node typings to your Ionic project.

Thanks,
Dan

@josh-m-sharpe
Copy link
Author

Hi @danbucholtz thanks for your reply - would you mind linking me to those things? I'm not super familiar with the ecosystem yet.

@danbucholtz
Copy link
Contributor

danbucholtz commented Feb 17, 2017

Lets track this here. Please weigh in with your thoughts. BTW, I think I misunderstood you. Yes, we use process.env.SOME_IONIC_VARIABLE liberally in the build process.

#762

Thanks,
Dan

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

No branches or pull requests

2 participants