{"action":"closed","issue":{"url":"https://api.github.com/repos/standard-things/esm/issues/290","repository_url":"https://api.github.com/repos/standard-things/esm","labels_url":"https://api.github.com/repos/standard-things/esm/issues/290/labels{/name}","comments_url":"https://api.github.com/repos/standard-things/esm/issues/290/comments","events_url":"https://api.github.com/repos/standard-things/esm/issues/290/events","html_url":"https://github.com/standard-things/esm/issues/290","id":299794973,"number":290,"title":"esm/Svelte SSR does not always recognize import/export","user":{"login":"EmilTholin","id":11573167,"avatar_url":"https://avatars0.githubusercontent.com/u/11573167?v=4","gravatar_id":"","url":"https://api.github.com/users/EmilTholin","html_url":"https://github.com/EmilTholin","followers_url":"https://api.github.com/users/EmilTholin/followers","following_url":"https://api.github.com/users/EmilTholin/following{/other_user}","gists_url":"https://api.github.com/users/EmilTholin/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilTholin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilTholin/subscriptions","organizations_url":"https://api.github.com/users/EmilTholin/orgs","repos_url":"https://api.github.com/users/EmilTholin/repos","events_url":"https://api.github.com/users/EmilTholin/events{/privacy}","received_events_url":"https://api.github.com/users/EmilTholin/received_events","type":"User","site_admin":false},"labels":[{"id":613130609,"url":"https://api.github.com/repos/standard-things/esm/labels/invalid","name":"invalid","color":"e6e6e6","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-23T17:46:49Z","updated_at":"2018-02-24T19:04:48Z","closed_at":"2018-02-24T19:04:48Z","author_association":"NONE","body":"Using esm for Svelte SSR works great, but when a Svelte component is the first thing to be required, esm does not seem to recognize `import`/`export`.\r\n\r\nE.g this works great:\r\n\r\n```javascript\r\nconst { square } = require('./module.js');\r\nrequire('svelte/ssr/register');\r\nconst app = require('./App.html');\r\n\r\nconsole.log(app.render().toString());\r\n```\r\n\r\nBut this gives rise to an error, like [this basic repro illustrates](https://github.com/EmilTholin/esm-svelte):\r\n\r\n```javascript\r\n// Works great if square is imported on its own first\r\n// const { square } = require('./module.js');\r\nrequire('svelte/ssr/register');\r\nconst app = require('./App.html');\r\n\r\nconsole.log(app.render().toString());\r\n```"}}
{"actor":{"display_login":"jdalton"}}