Closed elmasse closed 6 years ago
Seems to be related to the arrow function in the visitor.
function transformer(tree) {
visit(tree, 'text', node => {
node.value = node.value.replace(RE_EMOJI, getEmoji);
});
}
Would you accept a PR to change that into a regular fn so CRA doesn't complain when building a prod version?
Is the word 'skip' in there somewhere? 🤔 https://github.com/syntax-tree/unist-util-visit/blob/master/index.js#L8
Hey @wooorm thanks for jumping in. I don't think that's the issue. As I noted in my second comment CRA build complains because of the arrow function on index.js line 19
Thank you for reporting this issue. I'm not sure because I haven't used create-react-app, but I guess minifier does not support ES6 syntax.
Would you accept a PR to change that into a regular fn so CRA doesn't complain when building a prod version?
It's welcome. Please ensure that this issue is solved when () => {...}
is changed to function () {...}
before creating a PR.
Awesome! Thanks.
Let me know when you plan to publish a new version containing this change.
@elmasse I published 2.0.1 :+1:
Hello, first of all, thanks for this remark plugin!
I'm having a weird issue when using this within a create-react-app. And I cannot spot the error so far: Here is the output I got when running
npm run build
Any ideas? I'll give it a try by just copying the file to my
src
folder for now.Thanks