Skip to content

Conversation

@ggregoire
Copy link
Contributor

@ggregoire ggregoire commented Oct 2, 2018

This PR makes react-ladda works in create-react-app v2.

For those interested in a quick and temporary solution:

yarn remove react-ladda
yarn add https://github.com/ggregoire/react-ladda#93e39a1ac2c4e915e692e1faa6920a18d61e720f

And update your package.json to build react-ladda:

"start": "npm install --prefix ./node_modules/react-ladda && ./node_modules/react-ladda/node_modules/.bin/babel ./node_modules/react-ladda/src --out-dir ./node_modules/react-ladda/dist && react-scripts start",
"build": "npm install --prefix ./node_modules/react-ladda && ./node_modules/react-ladda/node_modules/.bin/babel ./node_modules/react-ladda/src --out-dir ./node_modules/react-ladda/dist && react-scripts build",

It seems to miss a build task to make the tests pass:

/home/travis/build/jsdir/react-ladda/node_modules/ladda/js/ladda.js:9
 import {Spinner} from 'spin.js';
 ^^^^^^
SyntaxError: Unexpected token import

I'm not super interested in fixing the build for the CI (and don't have much time to do so). Please update the PR if you have a solution to fix it. Or maybe we just have to update the node version in Travis?

@ywplee
Copy link

ywplee commented Jan 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants