Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Set process.env.NODE_ENV = 'production' when bundling #78

Open
SimenB opened this issue Sep 6, 2017 · 11 comments
Open

Set process.env.NODE_ENV = 'production' when bundling #78

SimenB opened this issue Sep 6, 2017 · 11 comments
Labels

Comments

@SimenB
Copy link
Contributor

SimenB commented Sep 6, 2017

Currently we get the development version of e.g. react in production. Would be nice to avoid that

@trygve-lie
Copy link
Contributor

trygve-lie commented Sep 7, 2017

Is there other ways to tell react to provide prod version than using process.env.NODE_ENV?

vue.js will btw have the same issue.

@SimenB
Copy link
Contributor Author

SimenB commented Sep 7, 2017

@sveisvei
Copy link
Contributor

sveisvei commented Sep 8, 2017

I think it makes sense to inject NODE_ENV from the server process.env.

@SimenB
Copy link
Contributor Author

SimenB commented Sep 11, 2017

Sorta related: we don't do minification

@sveisvei sveisvei added the bug label Oct 4, 2017
@SimenB
Copy link
Contributor Author

SimenB commented Jan 29, 2018

@digitalsadhu this is done now, right?

@digitalsadhu
Copy link
Member

Minification based on NODE_ENV=production yes.
We didn't end up including envify yet though so still need to revisit that.

@SimenB
Copy link
Contributor Author

SimenB commented Jan 29, 2018

ah, of course.

@digitalsadhu
Copy link
Member

We now support minification. Defaults to process.env.NODE_ENV with fallback to 'development' if not defined. Latest client also allows overriding this on any given client call.

@theneva
Copy link
Contributor

theneva commented Jul 3, 2018

market-frontpage on Podium v2 says this:

image

Looks like we still have a ways to to here

@theneva theneva reopened this Jul 3, 2018
@digitalsadhu
Copy link
Member

Wonder what’s up here.
Envify in use here:
https://github.com/asset-pipe/asset-pipe-js-reader/blob/742677c33284069c60f243334337d57a836417d6/lib/reader.js#L74

And I’ve seen this work with react.

@theneva
Copy link
Contributor

theneva commented Jul 3, 2018

Yep, I went digging and couldn't find anything obvious. Will have to continue looking into it tomorrow.

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

No branches or pull requests

5 participants