{"action":"created","issue":{"url":"https://api.github.com/repos/liferay/alloy-editor/issues/405","labels_url":"https://api.github.com/repos/liferay/alloy-editor/issues/405/labels{/name}","comments_url":"https://api.github.com/repos/liferay/alloy-editor/issues/405/comments","events_url":"https://api.github.com/repos/liferay/alloy-editor/issues/405/events","html_url":"https://github.com/liferay/alloy-editor/issues/405","id":123534681,"number":405,"title":"Getting error \"Uncaught SyntaxError: Identifier '_typeof' has already been declared\"","user":{"login":"3Cbwaltz","id":13559568,"avatar_url":"https://avatars.githubusercontent.com/u/13559568?v=3","gravatar_id":"","url":"https://api.github.com/users/3Cbwaltz","html_url":"https://github.com/3Cbwaltz","followers_url":"https://api.github.com/users/3Cbwaltz/followers","following_url":"https://api.github.com/users/3Cbwaltz/following{/other_user}","gists_url":"https://api.github.com/users/3Cbwaltz/gists{/gist_id}","starred_url":"https://api.github.com/users/3Cbwaltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3Cbwaltz/subscriptions","organizations_url":"https://api.github.com/users/3Cbwaltz/orgs","repos_url":"https://api.github.com/users/3Cbwaltz/repos","events_url":"https://api.github.com/users/3Cbwaltz/events{/privacy}","received_events_url":"https://api.github.com/users/3Cbwaltz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/liferay/alloy-editor/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/liferay/alloy-editor/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-12-22T18:42:15Z","updated_at":"2015-12-26T15:20:15Z","closed_at":"2015-12-23T21:46:31Z","body":"Just tried to set up a basic react component using alloy editor. I am using browserify, from reading the other comments, I tried to only require alloy editor in the componentDidMount() function. When I do this I get \"Uncaught SyntaxError: Identifier '_typeof' has already been declared\" in the Chrome console.\r\n\r\nHere is my component:\r\n```\r\nvar React = require('react');\r\nvar ReactDOM = require('react-dom');\r\nvar _ = require('lodash');\r\nvar $ = require('jquery');\r\n\r\nvar MyComponent = React.createClass({\r\n   componentDidMount(){\r\n      var AlloyEditor = require('alloyeditor');\r\n      AlloyEditor.editable(this.refs.content);\r\n   },\r\n   render() {\r\n     return(<div ref=\"content\">foo</div>);\r\n   },\r\n});\r\n\r\nmodule.exports = MyComponent;\r\n```\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/liferay/alloy-editor/issues/comments/167333391","html_url":"https://github.com/liferay/alloy-editor/issues/405#issuecomment-167333391","issue_url":"https://api.github.com/repos/liferay/alloy-editor/issues/405","id":167333391,"user":{"login":"beeant","id":162004,"avatar_url":"https://avatars.githubusercontent.com/u/162004?v=3","gravatar_id":"","url":"https://api.github.com/users/beeant","html_url":"https://github.com/beeant","followers_url":"https://api.github.com/users/beeant/followers","following_url":"https://api.github.com/users/beeant/following{/other_user}","gists_url":"https://api.github.com/users/beeant/gists{/gist_id}","starred_url":"https://api.github.com/users/beeant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeant/subscriptions","organizations_url":"https://api.github.com/users/beeant/orgs","repos_url":"https://api.github.com/users/beeant/repos","events_url":"https://api.github.com/users/beeant/events{/privacy}","received_events_url":"https://api.github.com/users/beeant/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T15:20:15Z","updated_at":"2015-12-26T15:20:15Z","body":"Oh yes, the language files can be a problem, I'm not sure but there should be a better solution instead of setting a global BASEPATH variable. I think popular module like `momentjs` has multi-language support, I haven't seen how they do it though.\r\n\r\nPointing it to the node_modules might probably make it even worse. I just go with the copy all the dist files solution for now I guess (although I still feel uneasy after doing it).\r\n\r\nYes, I would prefer setting the path from options object properties when initiating AlloyEditor. Like the properties can have `BASEPATH`, `theme`, `cfk plugins path`.\r\n\r\nI finished setting up `gulp`, `webpack`, and `webpack-dev-server` for my project, and AlloyEditor works great now! Just there are some other few things I need to find out, like binding the text value to React state/props, and also installing CFK plugins for photo upload after drag&drop."}}