brillout / wildcard-api

Functions as API.
MIT License
369 stars 14 forks source link

Lsos #52

Closed brillout closed 4 years ago

brillout commented 4 years ago

@lostpebble @michie1

I started to use @lsos/donation-reminder. This means you'll see a little donation-reminder in the browser dev console. You can remove it by running yarn lsos remove/npx lsos remove.

Let me know if this induces any inconvenience or if you feel disturbed by the donation-reminder in any way.

Rom :)

lostpebble commented 4 years ago

Hi @brillout

This message still seems to be showing in my production builds. I don't mind this during development, which is likely where it is most effective in getting a company to see it, but in production builds I purposefully remove all console logs except for those which are absolutely necessary.

Is there a way to stop this from happening without having to manually remove lsos ?

brillout commented 4 years ago

Hello Paul,

See https://github.com/Lsos/donation-reminder#end-user-how-do-i-make-sure-the-donation-reminder-is-not-shown-in-tests-staging-and-production

The donation-reminder will never be shown at https://www.vibescout.com/ since window.location.hostname!=='localhost'.

Is that good enough for you? Or do you want to test your prod builds and you don't want to see the donation-reminder then?

lostpebble commented 4 years ago

Okay, I see. That's generally fine, I don't mind it if it shows only when on localhost.

But according to the docs here:

window.process.env.NODE_ENV && !['dev', 'development'].includes(window.process.env.NODE_ENV)

I figured that because I bundle my code with process.env.NODE_ENV = "production" (basically any instance of that in my code is hard coded to true when building for production) that this would also cause this message to not show in the production bundle. Maybe I have to include the full window.process.env.NODE_ENV as well.