react-ladda icon indicating copy to clipboard operation
react-ladda copied to clipboard

Bump Ladda to v2

Open ggregoire opened this issue 6 years ago • 1 comments

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?

ggregoire avatar Oct 02 '18 18:10 ggregoire

published https://www.npmjs.com/package/@zumper/react-ladda

ywplee avatar Jan 16 '19 00:01 ywplee