{"action":"created","issue":{"url":"https://api.github.com/repos/theKashey/proxyequal/issues/15","repository_url":"https://api.github.com/repos/theKashey/proxyequal","labels_url":"https://api.github.com/repos/theKashey/proxyequal/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/theKashey/proxyequal/issues/15/comments","events_url":"https://api.github.com/repos/theKashey/proxyequal/issues/15/events","html_url":"https://github.com/theKashey/proxyequal/issues/15","id":430085448,"node_id":"MDU6SXNzdWU0MzAwODU0NDg=","number":15,"title":"ProxyPolyfill is unconditionally imported","user":{"login":"markerikson","id":1128784,"node_id":"MDQ6VXNlcjExMjg3ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1128784?v=4","gravatar_id":"","url":"https://api.github.com/users/markerikson","html_url":"https://github.com/markerikson","followers_url":"https://api.github.com/users/markerikson/followers","following_url":"https://api.github.com/users/markerikson/following{/other_user}","gists_url":"https://api.github.com/users/markerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/markerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markerikson/subscriptions","organizations_url":"https://api.github.com/users/markerikson/orgs","repos_url":"https://api.github.com/users/markerikson/repos","events_url":"https://api.github.com/users/markerikson/events{/privacy}","received_events_url":"https://api.github.com/users/markerikson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2019-04-06T23:03:49Z","updated_at":"2019-04-08T13:26:54Z","closed_at":null,"author_association":"NONE","body":"The current implementation _always_ imports `ProxyPolyfill`:\r\n\r\nhttps://github.com/theKashey/proxyequal/blob/f4692072301e63a7287e7cfbb0ac0cbc0feccfef/src/index.js#L4-L8\r\n\r\nHowever, that polyfill is 6K before minification, which looks like it's about 1/3 of the total source size.  \r\n\r\nPer https://bundlephobia.com/result?p=proxyequal@2.0.3 , the deployed size is 8.3K min and 3K min+gz.  If the polyfill was only conditionally imported (or even better, made a separate thing that users could import and enable themselves if needed), that size could probably shrink noticeably."},"comment":{"url":"https://api.github.com/repos/theKashey/proxyequal/issues/comments/480830861","html_url":"https://github.com/theKashey/proxyequal/issues/15#issuecomment-480830861","issue_url":"https://api.github.com/repos/theKashey/proxyequal/issues/15","id":480830861,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MDgzMDg2MQ==","user":{"login":"luisherranz","id":3305402,"node_id":"MDQ6VXNlcjMzMDU0MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/3305402?v=4","gravatar_id":"","url":"https://api.github.com/users/luisherranz","html_url":"https://github.com/luisherranz","followers_url":"https://api.github.com/users/luisherranz/followers","following_url":"https://api.github.com/users/luisherranz/following{/other_user}","gists_url":"https://api.github.com/users/luisherranz/gists{/gist_id}","starred_url":"https://api.github.com/users/luisherranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisherranz/subscriptions","organizations_url":"https://api.github.com/users/luisherranz/orgs","repos_url":"https://api.github.com/users/luisherranz/repos","events_url":"https://api.github.com/users/luisherranz/events{/privacy}","received_events_url":"https://api.github.com/users/luisherranz/received_events","type":"User","site_admin":false},"created_at":"2019-04-08T13:26:54Z","updated_at":"2019-04-08T13:26:54Z","author_association":"NONE","body":"Support in `babel-polyfill` would be ideal of course. If you open the issue let us know to show our support.\r\n\r\nBut if that doesn't happen, or while it happens, I think dependent libraries can choose for themselves between:\r\n - Use always the polyfilled (normal) version.\r\n - Use always the non-polyfilled (es6) version if they don't require ie11 support.\r\n - Give a different entry point for the non-polyfilled (es6) version, like `proxyequal/es6`:\r\n\r\n```javascript\r\nimport memoize from 'memoize-state/es6';\r\nimport { useReduxState } from 'reactive-react-redux/es6';\r\n```\r\n\r\nFor example, we want to use `proxyequal` (or `memoize-state`, not sure yet) in a project which won't have ie11 support (because the way we use `Proxy` for mutations) and therefore we will be including the polyfill unnecessarily.\r\n\r\nWhen SEO requirements are high, each Kb saved helps you with your Lighthouse metrics. Even if people want ie11 support they will probably end up doing the `<script type=\"module\">` trick to send es6 javascript to modern browsers and in that case having a separate `/es6` entry point will be quite useful because you can use the normal import in your code:\r\n```javascript\r\nimport memoize from 'memoize-state';\r\n```\r\nand an alias in the Webpack of es6 files:\r\n```javascript\r\nresolve: {\r\n  alias: {\r\n    \"memoize-state\": \"memoize-state/es6\"\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"luisherranz"}}