{"action":"created","issue":{"url":"https://api.github.com/repos/surveyjs/surveyjs/issues/495","repository_url":"https://api.github.com/repos/surveyjs/surveyjs","labels_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/495/labels{/name}","comments_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/495/comments","events_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/495/events","html_url":"https://github.com/surveyjs/surveyjs/issues/495","id":242531800,"number":495,"title":"NPM's package.json \"main\" field references the min.js file","user":{"login":"sylido","id":690914,"avatar_url":"https://avatars2.githubusercontent.com/u/690914?v=3","gravatar_id":"","url":"https://api.github.com/users/sylido","html_url":"https://github.com/sylido","followers_url":"https://api.github.com/users/sylido/followers","following_url":"https://api.github.com/users/sylido/following{/other_user}","gists_url":"https://api.github.com/users/sylido/gists{/gist_id}","starred_url":"https://api.github.com/users/sylido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylido/subscriptions","organizations_url":"https://api.github.com/users/sylido/orgs","repos_url":"https://api.github.com/users/sylido/repos","events_url":"https://api.github.com/users/sylido/events{/privacy}","received_events_url":"https://api.github.com/users/sylido/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-12T22:15:07Z","updated_at":"2017-07-13T08:59:22Z","closed_at":null,"body":"When building a meteor application it seems like the minifier uses the \"main\" field for the package to know which file needs mnification. We use a lot of npm packages and all of them seem to be referencing their non-minified .js file.\r\nI am wondering if this is an accepted best practice and if so, could we make the change that for the survey-* packages as well ?\r\n\r\nCurrent behavior uses the .min.js file, tries to be uglified+minified again, but the resulting file throws errors, i.e. it's not proper javascript.\r\n\r\nExpected behavior is that even when uglified/minified 2+ times it should generate a valid javascript file.\r\n\r\nThe error doesn't show up when running a meteor app in developer mode.\r\nOnly when building the app, when meteor minifies the libraries's files and subsequently you run the app the browser throws an error in the console.\r\nA simple example meteor project with survey-jquery included as an npm package in the package.json file should demonstrate the problem.\r\n"},"comment":{"url":"https://api.github.com/repos/surveyjs/surveyjs/issues/comments/315017039","html_url":"https://github.com/surveyjs/surveyjs/issues/495#issuecomment-315017039","issue_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/495","id":315017039,"user":{"login":"dmitrykurmanov","id":22315929,"avatar_url":"https://avatars0.githubusercontent.com/u/22315929?v=3","gravatar_id":"","url":"https://api.github.com/users/dmitrykurmanov","html_url":"https://github.com/dmitrykurmanov","followers_url":"https://api.github.com/users/dmitrykurmanov/followers","following_url":"https://api.github.com/users/dmitrykurmanov/following{/other_user}","gists_url":"https://api.github.com/users/dmitrykurmanov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitrykurmanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitrykurmanov/subscriptions","organizations_url":"https://api.github.com/users/dmitrykurmanov/orgs","repos_url":"https://api.github.com/users/dmitrykurmanov/repos","events_url":"https://api.github.com/users/dmitrykurmanov/events{/privacy}","received_events_url":"https://api.github.com/users/dmitrykurmanov/received_events","type":"User","site_admin":false},"created_at":"2017-07-13T08:59:21Z","updated_at":"2017-07-13T08:59:21Z","body":"@sylido, hello! Thanks for your interest. I didn't know about this best practice and this is true for that popular packages like **jquery** or **vuejs** or many others. So we will change our package.json"}}
{"actor":{"display_login":"dmitrykurmanov"}}