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

Browser version is not required anymore #18

Closed
TrySound opened this issue May 13, 2018 · 0 comments
Closed

Browser version is not required anymore #18

TrySound opened this issue May 13, 2018 · 0 comments

Comments

@TrySound
Copy link
Contributor

It seems like a year ago the problem was fixed by uglify and "browser" version is not longer required.

facebook/fbjs#86 (comment)

We may remove it with major release.

BerkeleyTrue pushed a commit that referenced this issue May 22, 2018
Ref #18

Since the problem with uglify is fixed there is not reason to keep
browser version which do not add any benefits. Actually it blocks us
from distributing `esm` version which is widely used these days and
supported by the most popular bundlers like webpack, rollup and parcel.

Here's a few links
facebook/fbjs#86 (comment)

Both uglify and babel minify support evaulation and eliminating

```js
(function () {
  function warning() {}

  var __DEV__ = 'production' !== 'production'

  if (__DEV__) {
    warning = function (msg) {
      console.log(msg)
    }
  }

  warning()
} ());
```

https://skalman.github.io/UglifyJS-online/

https://babeljs.io/repl#?babili=true&browsers=&build=&builtIns=false&code_lz=BQMwrgdgxgLglgewgAmASmQbwFDOeaeJZAdwEMAnCOCAc3SwF9tdkA3S5AfS4BEBRAGo9kAXmQByAA4UEAEzCxEECcgCEo8dNkKlSCSzxwQqHgOFcMOPHnJUatMfkh6UwALYBnWldY3kUEieCAA2AKYAdCEI9F4-fsjMeMysdtR06NiMqGhoANxAA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&lineWrap=false&presets=babili%2Cenv&prettier=false&targets=&version=6.26.0&envVersion=1.6.2
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

1 participant