Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create-react-app fails to minify #154

Closed
adanielyan opened this issue Mar 27, 2018 · 2 comments
Closed

Create-react-app fails to minify #154

adanielyan opened this issue Mar 27, 2018 · 2 comments
Labels

Comments

@adanielyan
Copy link

I use this package in my Create React App (CRA). I import it When I run npm run-script build I get the following error:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

        ./node_modules/kitsu/lib/index.mjs:1:1379

Read more here: http://bit.ly/2tRViJ9

Not sure what causes it, but according to link provided in the error message it CRA fails to compile es6 files.

@wopian
Copy link
Owner

wopian commented Mar 27, 2018

ES6+ syntax is only compiled down to supported syntax where not supported by our targets. You may find it'll work fine by importing the legacy bundle:

import Kitsu from 'kitsu/legacy'

Otherwise you'll have to wait until CRA 2.0 lands facebook/create-react-app#3776

@gaearon
Copy link

gaearon commented Oct 2, 2018

https://reactjs.org/blog/2018/10/01/create-react-app-v2.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants