{"action":"created","issue":{"url":"https://api.github.com/repos/Sinova/Collisions/issues/14","repository_url":"https://api.github.com/repos/Sinova/Collisions","labels_url":"https://api.github.com/repos/Sinova/Collisions/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Sinova/Collisions/issues/14/comments","events_url":"https://api.github.com/repos/Sinova/Collisions/issues/14/events","html_url":"https://github.com/Sinova/Collisions/issues/14","id":319569130,"number":14,"title":"Can't import with browserify and babel","user":{"login":"DustinJSilk","id":5979984,"avatar_url":"https://avatars3.githubusercontent.com/u/5979984?v=4","gravatar_id":"","url":"https://api.github.com/users/DustinJSilk","html_url":"https://github.com/DustinJSilk","followers_url":"https://api.github.com/users/DustinJSilk/followers","following_url":"https://api.github.com/users/DustinJSilk/following{/other_user}","gists_url":"https://api.github.com/users/DustinJSilk/gists{/gist_id}","starred_url":"https://api.github.com/users/DustinJSilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DustinJSilk/subscriptions","organizations_url":"https://api.github.com/users/DustinJSilk/orgs","repos_url":"https://api.github.com/users/DustinJSilk/repos","events_url":"https://api.github.com/users/DustinJSilk/events{/privacy}","received_events_url":"https://api.github.com/users/DustinJSilk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-02T14:11:26Z","updated_at":"2018-05-03T16:15:11Z","closed_at":null,"author_association":"NONE","body":"Im trying desperately to import this package but can't seem to get it to work.\r\n\r\nInstalling from npm and requiring the package as I would any other package throws this error:\r\n`\r\nParseError: 'import' and 'export' may appear only with 'sourceType: module'\r\n`\r\n\r\nI then dug around for a few hours with babel, browserify, grunt-browserify, and did a lot of research. It just seems as though using .mjs files isn't that supported yet?\r\n\r\nI then tried switching over to rollup however rollup had problems with most other libraries (fixing one, broke another). So i gave up on that. Babel it is.\r\n\r\nI then tried setting this package as a git submodule, and then importing it relative to my code. \r\nBrilliant!\r\nBut babel still didn't like the .mjs files.\r\nSo I created aliases for them all so hopefully names wouldnt mattter. I still couldn't get them to work.\r\n\r\nNext i tried adding a grunt task to copy all the files to .js. The problem being that you're referencing the relative files with extensions. So that solution along with the aliases still don't work.\r\n\r\nIs there any way i can get this to work without having to fork the repo? I think it would need to support standard commonjs imports."},"comment":{"url":"https://api.github.com/repos/Sinova/Collisions/issues/comments/386351002","html_url":"https://github.com/Sinova/Collisions/issues/14#issuecomment-386351002","issue_url":"https://api.github.com/repos/Sinova/Collisions/issues/14","id":386351002,"user":{"login":"GrosSacASac","id":5721194,"avatar_url":"https://avatars0.githubusercontent.com/u/5721194?v=4","gravatar_id":"","url":"https://api.github.com/users/GrosSacASac","html_url":"https://github.com/GrosSacASac","followers_url":"https://api.github.com/users/GrosSacASac/followers","following_url":"https://api.github.com/users/GrosSacASac/following{/other_user}","gists_url":"https://api.github.com/users/GrosSacASac/gists{/gist_id}","starred_url":"https://api.github.com/users/GrosSacASac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrosSacASac/subscriptions","organizations_url":"https://api.github.com/users/GrosSacASac/orgs","repos_url":"https://api.github.com/users/GrosSacASac/repos","events_url":"https://api.github.com/users/GrosSacASac/events{/privacy}","received_events_url":"https://api.github.com/users/GrosSacASac/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T16:15:11Z","updated_at":"2018-05-03T16:15:11Z","author_association":"NONE","body":"> My setup uses ES6 modules for all my frontend code\r\n\r\ncan you show your import statement ?"}}
{"actor":{"display_login":"GrosSacASac"}}