Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

create-react-app: You may need an appropriate loader to handle this file type #3

Closed
wiradikusuma opened this issue Feb 4, 2018 · 1 comment

Comments

@wiradikusuma
Copy link

I use https://github.com/facebook/create-react-app and it comes with ES6 and Babel, but I can't make this component to work:

./node_modules/react-medium-editor-es6/src/editor.js
Module parse failed: /Users/wiradikusuma/Documents/.../client/node_modules/react-medium-editor-es6/src/editor.js Unexpected token (14:21)
You may need an appropriate loader to handle this file type.
| 
| export default class MediumEditor extends Component {
|     static propTypes = {
|         tag: PropTypes.string,
|         text: PropTypes.string,

I'm missing something?

@bitspook
Copy link
Owner

bitspook commented Feb 5, 2018

Hello @wiradikusuma,

As mentioned in the installation step, you need to include this module in babel-loader's configuration so it can get transpiled with rest of the ES6 code. Evidently, create-react-app won't let you do that .

Perhaps you should use the original component (the one this package is forked from).

@bitspook bitspook closed this as completed Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant