{"action":"created","issue":{"url":"https://api.github.com/repos/regl-project/regl/issues/464","repository_url":"https://api.github.com/repos/regl-project/regl","labels_url":"https://api.github.com/repos/regl-project/regl/issues/464/labels{/name}","comments_url":"https://api.github.com/repos/regl-project/regl/issues/464/comments","events_url":"https://api.github.com/repos/regl-project/regl/issues/464/events","html_url":"https://github.com/regl-project/regl/issues/464","id":306020318,"number":464,"title":"browserify always bundles the minified file","user":{"login":"Prinzhorn","id":679144,"avatar_url":"https://avatars0.githubusercontent.com/u/679144?v=4","gravatar_id":"","url":"https://api.github.com/users/Prinzhorn","html_url":"https://github.com/Prinzhorn","followers_url":"https://api.github.com/users/Prinzhorn/followers","following_url":"https://api.github.com/users/Prinzhorn/following{/other_user}","gists_url":"https://api.github.com/users/Prinzhorn/gists{/gist_id}","starred_url":"https://api.github.com/users/Prinzhorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prinzhorn/subscriptions","organizations_url":"https://api.github.com/users/Prinzhorn/orgs","repos_url":"https://api.github.com/users/Prinzhorn/repos","events_url":"https://api.github.com/users/Prinzhorn/events{/privacy}","received_events_url":"https://api.github.com/users/Prinzhorn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-16T17:47:06Z","updated_at":"2018-05-18T09:40:05Z","closed_at":"2018-05-16T23:52:07Z","author_association":"CONTRIBUTOR","body":"I'm trying to understand what is happening with my local build and I'm trying to figure out what this transform (#326) is supposed to do.\r\n\r\nThe issue I'm having is that regl is the only dependency in my build which is minified in development, which makes it hard/impossible to debug.\r\n\r\nSteps to reproduce in a clean directory\r\n\r\n```\r\nnpm i regl\r\necho \"require('regl')\" > index.js\r\nnpx browserify index.js > bundle.js\r\n```\r\n\r\nThe bundle.js now contains the minified regl.\r\n\r\nWhat is the purpose of the browserify transform that was added in #326? If I remove it, browserify correctly uses the `main` file specified in package.json and I get a non-minified bundle.js"},"comment":{"url":"https://api.github.com/repos/regl-project/regl/issues/comments/390153790","html_url":"https://github.com/regl-project/regl/issues/464#issuecomment-390153790","issue_url":"https://api.github.com/repos/regl-project/regl/issues/464","id":390153790,"user":{"login":"Prinzhorn","id":679144,"avatar_url":"https://avatars0.githubusercontent.com/u/679144?v=4","gravatar_id":"","url":"https://api.github.com/users/Prinzhorn","html_url":"https://github.com/Prinzhorn","followers_url":"https://api.github.com/users/Prinzhorn/followers","following_url":"https://api.github.com/users/Prinzhorn/following{/other_user}","gists_url":"https://api.github.com/users/Prinzhorn/gists{/gist_id}","starred_url":"https://api.github.com/users/Prinzhorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Prinzhorn/subscriptions","organizations_url":"https://api.github.com/users/Prinzhorn/orgs","repos_url":"https://api.github.com/users/Prinzhorn/repos","events_url":"https://api.github.com/users/Prinzhorn/events{/privacy}","received_events_url":"https://api.github.com/users/Prinzhorn/received_events","type":"User","site_admin":false},"created_at":"2018-05-18T09:40:05Z","updated_at":"2018-05-18T09:40:05Z","author_association":"CONTRIBUTOR","body":"Now that I know about `--debug` i can use it instead of manually patching regl inside node_modules. However, I believe it is a misuse of the flag since it has side effects not intended by browserify\r\n\r\n> When opts.debug is true, add a source map inline to the end of the bundle. This makes debugging easier because you can see all the original files if you are in a modern enough browser.\r\n\r\nOr does it? As far as I understand you're shipping the unminified regl when --debug is set, instead of a source map?\r\n\r\n> so that you don't need to write the conditional if (process.env.NODE_ENV === 'development') check.command(...); throughout the codebase\r\n\r\nI see. I does make sense what you're saying, but it looks like a homebrown solution specific to this repository if I understand https://github.com/regl-project/regl/blob/8f26f111a913cd9f7f239ebcdf691189e82c7a5f/rollup/plugins/remove-check.js correctly."}}
{"actor":{"display_login":"Prinzhorn"}}