Storybook-readme: markdown render

Created on 20 Jun 2018  路  10Comments  路  Source: tuchk4/storybook-readme

Hey guys, I'm using storybook-readme, but in my render, I receive \n for each break line.

How I can fix it?

screen shot 2018-06-20 at 11 59 43

Most helpful comment

  storybookBaseConfig.module.rules.push({
    test: /\.md$/,
-   loaders: ["html-loader" ,"markdown-loader"],
+   loaders: ["markdown-loader"],
    include: path.resolve(__dirname, "../test")
  });

you must remove html-loader,i fix it
@darlanmendonca

All 10 comments

@darlanmendonca show please your package.json

@tuchk4, dependencies in package.json =>

{
"devDependencies": {
    "@storybook/addon-knobs": "^4.0.0-alpha.6",
    "@storybook/addons": "^4.0.0-alpha.6",
    "@storybook/react": "^4.0.0-alpha.6",
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.0",
    "babel-preset-import-export": "^1.0.2",
    "babel-preset-react": "^6.24.1",
    "babel-runtime": "^6.26.0",
    "chai": "^4.1.2",
    "chai-dom": "^1.7.0",
    "chai-enzyme": "^1.0.0-beta.0",
    "chai-spies": "^1.0.0",
    "css-loader": "^0.28.11",
    "document-register-element": "^1.7.2",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "eslint": "^4.19.1",
    "html-loader": "^0.5.5",
    "jest": "^22.4.3",
    "jest-css-modules": "^1.1.0",
    "jsdom": "^11.6.2",
    "markdown-loader": "^3.0.0",
    "mutation-observer": "^1.0.3",
    "node-sass": "^4.8.3",
    "sass-loader": "^6.0.7",
    "storybook-addon-jsx": "^5.3.0",
    "storybook-readme": "^3.3.0",
    "style-loader": "^0.20.3",
    "webpack": "^4.8.3"
  }
}
  storybookBaseConfig.module.rules.push({
    test: /\.md$/,
-   loaders: ["html-loader" ,"markdown-loader"],
+   loaders: ["markdown-loader"],
    include: path.resolve(__dirname, "../test")
  });

you must remove html-loader,i fix it
@darlanmendonca

Yes the problem is in loaders.
Right now I have no time to reproduce it with you deps. versions.

@darlanmendonca do you have custom webpack config at your storybook?

thanks @Jetsly and @tuchk4, remove the html-loader fix the problem :D

but, why html-loader is necessary? they are in readme docs/example from storybook-readme

image

Also have the module.exports = "...

yep @JimmyLv, but removing html loader, fix it too

@darlanmendonca

https://github.com/tuchk4/storybook-readme#webpack-configuration-for-react-storybook

The example for versions lower than @storybooks/[email protected].
Now these loaders are inside storybook core.

@Jetsly Nice

Was this page helpful?
0 / 5 - 0 ratings

Related issues

beyondghx picture beyondghx  路  6Comments

lychyi picture lychyi  路  5Comments

LukyVj picture LukyVj  路  5Comments

jayknott picture jayknott  路  6Comments

deehuey picture deehuey  路  3Comments