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

Unable to Use Decorators with Default Create-React-App Config #495

Closed
ambroselittle opened this issue Jun 13, 2017 · 1 comment
Closed
Labels

Comments

@ambroselittle
Copy link

Steps:

  1. Follow guide here: https://react-styleguidist.js.org/docs/getting-started.html
  2. Install something that uses decorators (e.g., mobx/mobx-react).
  3. Add a testComponent that uses a decorator to /src/components
  4. Run

Repro Repo:
https://github.com/ambroselittle/styleguidist-test

Error I am seeing when running (npm run styleguide) on latest macOS:

Failed to compile.

Error in ./src/components/testComponent.jsx
Syntax error: Unexpected token (4:0)

  2 | import {observer} from 'mobx-react';
  3 | 
> 4 | @observer
    | ^
  5 | export default class TestComponent extends Component {
  6 |     render() {
  7 |         return (

 @ ./~/react-styleguidist/loaders/styleguide-loader.js!./~/react-styleguidist/lib/index.js 25:30-129
 @ ./~/react-styleguidist/lib/index.js
 @ multi ./~/react-styleguidist/lib/index ./~/react-styleguidist/~/react-dev-utils/webpackHotDevClient.js
@sapegin
Copy link
Member

sapegin commented Jun 13, 2017

First link in Google: facebook/create-react-app#214

@sapegin sapegin closed this as completed Jun 13, 2017
@styleguidist styleguidist locked and limited conversation to collaborators Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants