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

more thorough setup instructions would be appreciated #2

Open
seiyria opened this issue Nov 21, 2017 · 4 comments
Open

more thorough setup instructions would be appreciated #2

seiyria opened this issue Nov 21, 2017 · 4 comments

Comments

@seiyria
Copy link

seiyria commented Nov 21, 2017

Not sure how to import the environment using this plugin, for example.

@AksimO
Copy link
Owner

AksimO commented Nov 22, 2017

@seiyria, not sure what exactly you need to solve.
This plugin allows to you to have different files for different env

For example you need 2 versions of src/folder/environment.ts file.
You need to create 3 files
First with dummy values (mainly for you IDE not o complain that file does not exist). src/folder/environment.dev.ts and src/folder/environment.prod.ts files with env dependent constants.

In your code you need to import dummy file

import  { MY_CONST } from “./folder/environment”;

Plugin replaces dummy file with needed file.

@seiyria
Copy link
Author

seiyria commented Nov 22, 2017 via email

@AksimO
Copy link
Owner

AksimO commented Nov 22, 2017

@seiyria, Is it one of your public repos? I would like to check why I didn't work.

@seiyria
Copy link
Author

seiyria commented Nov 22, 2017

@AksimO I never pushed it because I couldn't get it to work, sorry.

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

2 participants