preactjs / preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
http://npm.im/preact-compat
MIT License
949 stars 148 forks source link

Make process shim not necessary on production environments #472

Closed kaisermann closed 6 years ago

kaisermann commented 6 years ago

Fixes #403

kaisermann commented 6 years ago

I agree. Done!

lukeed commented 6 years ago

Is the shim still skipped if we do this?

const DEV = typeof process === 'undefined' || process.env.NODE_ENV !== 'production';
k1r0s commented 6 years ago

@lukeed I would preffer @kaisermann statement since is more easy to read and has no chance to raise NPE

k1r0s commented 6 years ago

LGFM! any comments before merging?

lukeed commented 6 years ago

Nope~! I don't think mine is any harder to read, but I'm happy as long as a solution works 😄

k1r0s commented 6 years ago

Slightly hard haha, both are easy to read sorry :)