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

Basic setup with create-react-app does not display markdown documentation #1993

Open
ThomasRoest opened this issue Apr 3, 2022 · 5 comments

Comments

@ThomasRoest
Copy link
Collaborator

ThomasRoest commented Apr 3, 2022

Current behavior

This very basic setup with create-react-app does not seem to work as expected. The component is found, but the markdown file isn't?
In the chrome devtools I do get the following HMR / webpack dev server message:

[HMR] Waiting for update signal from WDS...

To reproduce

The repo with example: https://github.com/ThomasRoest/styleguidist-test

Expected behavior

By default, it should also find and render the markdown examples.

Versions
create-react-app 5.0.0
react-styleguidist 11.2.0

@elciocf
Copy link

elciocf commented Apr 4, 2022

same here

@ThomasRoest
Copy link
Collaborator Author

ThomasRoest commented Apr 6, 2022

Displaying the examples can be fixed with the workaround described in #1910 (comment)

But this still leaves the problem of hot module reloading not working

@eya26
Copy link

eya26 commented Apr 23, 2022

I reproduced the example in the repo with the same versions, however, the markdown examples are rendered.
styleguidistTest

styleguidistTest2

@ThomasRoest
Copy link
Collaborator Author

@eya26 yes because it includes this workaround ThomasRoest/styleguidist-test@f11e7e0

@adubouski
Copy link

adubouski commented May 27, 2022

Displaying the examples can be fixed with the workaround described in #1910 (comment)

But this still leaves the problem of hot module reloading not working

For all who curious, after a few days of debugging, the following config (added to the workaround mentioned above) fixes hot reloading:

const webpackConfig = {
  devServer: {
      // Not really necessary, but to match the new webpack defaults
      sockPath: '/ws',
      // Web socket client is not injected by CRA webpack config, so ask webpack
      // to include the default one for us
      injectClient: true,
    },
    module: {
      ...
    },
    ...
}

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

No branches or pull requests

4 participants