-
Notifications
You must be signed in to change notification settings - Fork 641
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
Does not build with create-react-app #134
Comments
Hi, the problem is closely connected to this point in the readme. The issue is that your app need to have babel-plugin-transform-class-properties enabled. While we ship transpiled ES5 code with the module, webpack 2+ uses the original ESnext code by default, which needs this plugin. So there are two options: use the transpiled code or install the plugin.
// import Timeline from 'react-calendar-timeline' // old
import Timeline from 'react-calendar-timeline/lib' // new This path may change in the future, so pay attention to the changelog when upgrading!
yarn add custom-react-scripts
yarn remove react-scripts Then add this line to a file called
Then you may import the component like you would normally import Timeline from 'react-calendar-timeline' |
Using custom-react-scripts worked great for me when i was running into this same issue using webpack 2+. Thanks so much!! |
@mariusandra I have similar but little bit different issue. I am using create-react-app for building the app. The app works fine in development mode but when I run the production build using |
I use react-calendar-timeline together with create-react-app but 0.15.0 don't build:
I don't want to eject my projects to include more loaders in the build process which makes it impossible to use this version.
(Thanks for a great product, by the way!)
The text was updated successfully, but these errors were encountered: