{"action":"created","issue":{"url":"https://api.github.com/repos/securingsincity/react-ace/issues/360","repository_url":"https://api.github.com/repos/securingsincity/react-ace","labels_url":"https://api.github.com/repos/securingsincity/react-ace/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/securingsincity/react-ace/issues/360/comments","events_url":"https://api.github.com/repos/securingsincity/react-ace/issues/360/events","html_url":"https://github.com/securingsincity/react-ace/issues/360","id":289851976,"node_id":"MDU6SXNzdWUyODk4NTE5NzY=","number":360,"title":"Integration with react-boilerplate","user":{"login":"henviso","id":926265,"node_id":"MDQ6VXNlcjkyNjI2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/926265?v=4","gravatar_id":"","url":"https://api.github.com/users/henviso","html_url":"https://github.com/henviso","followers_url":"https://api.github.com/users/henviso/followers","following_url":"https://api.github.com/users/henviso/following{/other_user}","gists_url":"https://api.github.com/users/henviso/gists{/gist_id}","starred_url":"https://api.github.com/users/henviso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henviso/subscriptions","organizations_url":"https://api.github.com/users/henviso/orgs","repos_url":"https://api.github.com/users/henviso/repos","events_url":"https://api.github.com/users/henviso/events{/privacy}","received_events_url":"https://api.github.com/users/henviso/received_events","type":"User","site_admin":false},"labels":[{"id":604381747,"node_id":"MDU6TGFiZWw2MDQzODE3NDc=","url":"https://api.github.com/repos/securingsincity/react-ace/labels/awaiting%20response","name":"awaiting response","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-19T03:28:43Z","updated_at":"2018-10-23T20:44:32Z","closed_at":null,"author_association":"NONE","body":"# Problem\r\nHello guys, I'm new to react-ace, very nice project by the way, I liked a lot.\r\nI have a very noob question, I just bootstraped a project with [https://github.com/react-boilerplate/react-boilerplate](url), added react-ace as a dependency and everything seems to be working fine.\r\n\r\nBut I'm getting the error above on the console:\r\n\r\n```javascript\r\n_mode-mode.js:1 Uncaught SyntaxError: Unexpected token <_\r\n```\r\n\r\nIt seems that it is something about webpack configuration between both projects? Can you guys recommend anything about this setup? \r\n \r\nThis is the way I'm using react-ace:\r\n\r\n```javascript\r\nimport React, { Component } from 'react';\r\nimport AceEditor from 'react-ace';\r\nimport messages from './messages';\r\n\r\nimport 'brace/theme/github';\r\n\r\nexport default class HomePage extends Component { // eslint-disable-line react/prefer-stateless-function\r\n  render() {\r\n    return (\r\n      <div>\r\n        <AceEditor\r\n          mode=\"\"\r\n          theme=\"github\"\r\n          onChange={() => null}\r\n          name=\"UNIQUE_ID_OF_DIV\"\r\n          editorProps={{ $blockScrolling: true }}\r\n        />\r\n      </div>\r\n    );\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/securingsincity/react-ace/issues/comments/432412445","html_url":"https://github.com/securingsincity/react-ace/issues/360#issuecomment-432412445","issue_url":"https://api.github.com/repos/securingsincity/react-ace/issues/360","id":432412445,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjQxMjQ0NQ==","user":{"login":"fbove","id":17007814,"node_id":"MDQ6VXNlcjE3MDA3ODE0","avatar_url":"https://avatars3.githubusercontent.com/u/17007814?v=4","gravatar_id":"","url":"https://api.github.com/users/fbove","html_url":"https://github.com/fbove","followers_url":"https://api.github.com/users/fbove/followers","following_url":"https://api.github.com/users/fbove/following{/other_user}","gists_url":"https://api.github.com/users/fbove/gists{/gist_id}","starred_url":"https://api.github.com/users/fbove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbove/subscriptions","organizations_url":"https://api.github.com/users/fbove/orgs","repos_url":"https://api.github.com/users/fbove/repos","events_url":"https://api.github.com/users/fbove/events{/privacy}","received_events_url":"https://api.github.com/users/fbove/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T20:44:32Z","updated_at":"2018-10-23T20:44:32Z","author_association":"NONE","body":"It's happening to me as well, and I have those imports declared. This is my code:\r\n```jsx\r\nimport AceEditor from 'react-ace'\r\nimport 'brace/mode/python'\r\nimport 'brace/theme/monokai'\r\n// ...\r\n<AceEditor\r\n  name=\"ACE_EDITOR\"\r\n  value={this.props.value}\r\n  mode=\"python\"\r\n  theme=\"monokai\"\r\n/>\r\n```\r\nIt also works, but in the console it throws:\r\n`Uncaught SyntaxError: Unexpected token <` python.js:1\r\nAnd if I go to that file, hosted on `/snippets/python.js`, it shows my index.html\r\n\r\nSo my guess is that I'll need to add some extra config on webpack in order to copy that required JS (`/brace/snippets/python.js`) to a public location; using `copy-webpack-plugin`.\r\n\r\nAny thoughts?"}}
{"actor":{"display_login":"fbove"}}