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

Replacing environment / production #1

Open
iangregsondev opened this issue Jun 7, 2019 · 1 comment
Open

Replacing environment / production #1

iangregsondev opened this issue Jun 7, 2019 · 1 comment

Comments

@iangregsondev
Copy link

Hi,

Thank you for all your hard work here, I finally managed to get it to work on my project.

I was wondering if in the NEST project there is a quick way of replacing the environment and environment production - depending on if its a prod verson?

As, technically it doesn;'t run directly through angular.json it doesn't take into consideration the replacement feature

have any ideas ?

@xvs32x
Copy link

xvs32x commented Jul 23, 2019

@appsolutegeek
I use ReplacementPlugin for Webpack. Code below replaces environment.ts to environment.prod.ts. In my case I use SSR in PROD only, but I hope you can adapt this code for your case

// webpack.server.config - add code below in to config.plugins
new webpack.NormalModuleReplacementPlugin(
    /environment\.ts/,
    'environment.prod.ts'
  )

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