{"action":"closed","issue":{"url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/4","labels_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/4/comments","events_url":"https://api.github.com/repos/thejameskyle/babel-plugin-handbook/issues/4/events","html_url":"https://github.com/thejameskyle/babel-plugin-handbook/issues/4","id":117286813,"number":4,"title":"Clarification ... Does babylon allow parsing 'import' and 'export'","user":{"login":"annamalai-saro","id":5235065,"avatar_url":"https://avatars.githubusercontent.com/u/5235065?v=3","gravatar_id":"","url":"https://api.github.com/users/annamalai-saro","html_url":"https://github.com/annamalai-saro","followers_url":"https://api.github.com/users/annamalai-saro/followers","following_url":"https://api.github.com/users/annamalai-saro/following{/other_user}","gists_url":"https://api.github.com/users/annamalai-saro/gists{/gist_id}","starred_url":"https://api.github.com/users/annamalai-saro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annamalai-saro/subscriptions","organizations_url":"https://api.github.com/users/annamalai-saro/orgs","repos_url":"https://api.github.com/users/annamalai-saro/repos","events_url":"https://api.github.com/users/annamalai-saro/events{/privacy}","received_events_url":"https://api.github.com/users/annamalai-saro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-17T05:36:06Z","updated_at":"2015-11-17T06:13:26Z","closed_at":"2015-11-17T06:13:26Z","body":"```js\r\nimport {parse} from \"babylon\";\r\nimport traverse from \"babel-traverse\";\r\nimport {readFileSync} from 'fs';\r\n\r\nconst code = `import Ember from 'ember';    //No I18N\r\nexport default Ember.View.extend({\r\n   classNames    :   [\"full-height\",\"flex\"]//No I18N\r\n});\r\n`;\r\nconst ast = parse(code);\r\nconsole.log(ast);\r\n```\r\n\r\nI get error\r\n\r\n```\r\n/Volumes/Official/classo/node_modules/babylon/lib/parser/location.js:27\r\n  throw err;\r\n  ^\r\n\r\nSyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (1:0)\r\n    at Parser.pp.raise (/Volumes/Official/classo/node_modules/babylon/lib/parser/location.js:24:13)\r\n    at Parser.pp.parseStatement (/Volumes/Official/classo/node_modules/babylon/lib/parser/statement.js:134:16)\r\n    at Parser.pp.parseBlockBody (/Volumes/Official/classo/node_modules/babylon/lib/parser/statement.js:529:25)\r\n    at Parser.pp.parseTopLevel (/Volumes/Official/classo/node_modules/babylon/lib/parser/statement.js:31:8)\r\n    at Parser.parse (/Volumes/Official/classo/node_modules/babylon/lib/parser/index.js:98:17)\r\n    at parse (/Volumes/Official/classo/node_modules/babylon/lib/index.js:46:50)\r\n    at Object.<anonymous> (parser.js:1:14)\r\n    at Module._compile (module.js:425:26)\r\n    at loader (/Volumes/Official/classo/node_modules/babel-register/lib/node.js:128:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Volumes/Official/classo/node_modules/babel-register/lib/node.js:138:7)\r\n```"}}