{"action":"created","issue":{"url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1199","repository_url":"https://api.github.com/repos/flatpickr/flatpickr","labels_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1199/labels{/name}","comments_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1199/comments","events_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1199/events","html_url":"https://github.com/flatpickr/flatpickr/issues/1199","id":289085644,"number":1199,"title":"has no default export and flatpickr is undefined","user":{"login":"hoppities","id":5777714,"avatar_url":"https://avatars3.githubusercontent.com/u/5777714?v=4","gravatar_id":"","url":"https://api.github.com/users/hoppities","html_url":"https://github.com/hoppities","followers_url":"https://api.github.com/users/hoppities/followers","following_url":"https://api.github.com/users/hoppities/following{/other_user}","gists_url":"https://api.github.com/users/hoppities/gists{/gist_id}","starred_url":"https://api.github.com/users/hoppities/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoppities/subscriptions","organizations_url":"https://api.github.com/users/hoppities/orgs","repos_url":"https://api.github.com/users/hoppities/repos","events_url":"https://api.github.com/users/hoppities/events{/privacy}","received_events_url":"https://api.github.com/users/hoppities/received_events","type":"User","site_admin":false},"labels":[{"id":747076049,"url":"https://api.github.com/repos/flatpickr/flatpickr/labels/P1","name":"P1","color":"bc4301","default":false},{"id":816459045,"url":"https://api.github.com/repos/flatpickr/flatpickr/labels/build","name":"build","color":"ffa544","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-01-16T22:59:55Z","updated_at":"2018-02-13T05:15:13Z","closed_at":null,"author_association":"NONE","body":"I'm experiencing two problems.\r\n\r\n1. The documentation says to `import flatpickr from \"flatpickr\"`, but when I do that, webpack errors on the build with the following log message\r\n\r\n`TS1192: Module '\"pathtoplace/node_modules/flatpickr/index\"' has no default export.`\r\n\r\nI can successfully import flatpickr by using `import * as flatpickr from \"flatpickr\"`\r\n\r\nThis works fine locally, but when it is deployed to a test server and minified (issue #2), I receive the following error:\r\n\r\n`e is not a function`\r\n\r\nflatpickr is available globally, but the minified code does not run and I cannot create a new flatpickr instance.\r\n\r\nCode that is being called and failing on minification.\r\n```\r\n            this.flatpickrObj = flatpickr(\".\" + this.classes, this.config);\r\n            if (this.value) {\r\n                this.flatpickrObj.setDate(this.value, true);\r\n            }\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/flatpickr/flatpickr/issues/comments/365153513","html_url":"https://github.com/flatpickr/flatpickr/issues/1199#issuecomment-365153513","issue_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1199","id":365153513,"user":{"login":"Bigdragon13th","id":8828628,"avatar_url":"https://avatars1.githubusercontent.com/u/8828628?v=4","gravatar_id":"","url":"https://api.github.com/users/Bigdragon13th","html_url":"https://github.com/Bigdragon13th","followers_url":"https://api.github.com/users/Bigdragon13th/followers","following_url":"https://api.github.com/users/Bigdragon13th/following{/other_user}","gists_url":"https://api.github.com/users/Bigdragon13th/gists{/gist_id}","starred_url":"https://api.github.com/users/Bigdragon13th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bigdragon13th/subscriptions","organizations_url":"https://api.github.com/users/Bigdragon13th/orgs","repos_url":"https://api.github.com/users/Bigdragon13th/repos","events_url":"https://api.github.com/users/Bigdragon13th/events{/privacy}","received_events_url":"https://api.github.com/users/Bigdragon13th/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T05:15:13Z","updated_at":"2018-02-13T05:15:13Z","author_association":"NONE","body":"@chmln I think, at least you should state that\r\n```\r\nconst flatpickr = require(\"flatpickr\");\r\n```\r\nshould be changed to\r\n```\r\nconst flatpickr = require(\"flatpickr\").default;\r\n```\r\nin the document: https://chmln.github.io/flatpickr/getting-started/\r\nAnd also in the changelog, because this is breaking change."}}
{"actor":{"display_login":"Bigdragon13th"}}