I cant seem to get this to work with the latest storybook beta release. Im in the process of trying to track down if the addon api changed or something but its currently broken.
Maybe if you could just help me learn how this works i can debug.. i have looked trough every file in your source code and i see that the way the README gets injected is the following
<div
key={index}
className={'markdown-body'}
dangerouslySetInnerHTML={{ __html: doc }}
/>
But i dont understand how that turns markdown into HTML?? Am i missing something. There must be some function that you call to translate the MD to MarkUp haha?
Ok i traked it down to the new version of storybook ( Beta ) Not using the html and markdown loader.. now my only issue left is the classes are not getting added to the parsed html tags. Any ideas?
Ok the classes are getting added but im getting a bunch of \n showing up.. its prob somthing stupid
Ok so for those that run into this same issue.. the solve was to manually override the storybookBase config, in a custom webpack config under the .storybook directory. This is by no means a good solve but it looks like the beta release just uses raw loader where it used to use html and markdown loader.
storybookBaseConfig.module.rules[1] = {
test: /\.md$/,
use: [
{
loader: 'html-loader',
},
{
loader: 'markdown-loader',
options: {
}
},
],
include: path.resolve(__dirname, "../"),
exclude: /node_modules/
};
Hi @joepuzzo,
thanks for the insights. Definitly helps, but have you experience this issue as well:

My webpack.config.js looks like this currently
module.exports = {
module: {
rules: [
{
test: /\.md$/,
use: [
{
loader: 'html-loader',
},
{
loader: 'markdown-loader',
},
],
},
{
test: /\.(css|scss)$/,
use: ['style-loader', 'css-loader?sourceMap', 'sass-loader?sourceMap'],
},
{
test: /\.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
loader: 'file-loader?name=fonts/[name].[ext]',
},
{
test: /\.(png|jpg|gif|svg)$/,
use: [
{
loader: 'file-loader',
},
],
},
],
},
}
And I am using the following dependencies:
"@storybook/addon-actions": "4.0.0-alpha.14",
"@storybook/addon-options": "4.0.0-alpha.14",
"@storybook/react": "4.0.0-alpha.14",
"storybook-readme": "3.3.0",
Yea i have! Im not at my comp rigt now and forget the solve but i will look later
Or rather u can go check out my informed lib on my github because thats configured correctly
Sorry guys, I am on vacation and without my mac. Will get back at monday
and help to resolve your issues.
On Sat, Jul 28, 2018 at 13:32 Joe Puzzo notifications@github.com wrote:
Or rather u can go check out my informed lib on my github because thats
configured correctly—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tuchk4/storybook-readme/issues/79#issuecomment-408598217,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE5wg0oXSEYKmbtJplVSzFDrMVCbnh-tks5uLD2xgaJpZM4VMofA
.
thank you @joepuzzo, I am going to check it out.
Enjoy your vacation @tuchk4 :)
Hi @tuchk4, did you find some time to investigate this issue further?
same issue
@natterstefan going to investigate this issue today
Fix in master. Going to release to make beta release tomorrow because need to test it again and make some changes for vue.
Thank you very much @tuchk4, sounds great!
Hi @tuchk4 - I was looking in master for the fix but it looks like master hasn't been updated since July.
Are you still plan on doing a beta release?
@morficus going to publish new version today.
Sorry for the delay
Published [email protected]. Can you please take a look and ping if any problems.
Going publish stable version with storybook's 4x stable
Hi @tuchk4, it works for me. Thank you!
Yup! the 4.0.0-beta1 works for me as well!
Thank you very much!
released in 4.0.0
@tuchk4 awesome, thanks you very much!
Most helpful comment
Sorry for the delay
Published
[email protected]. Can you please take a look and ping if any problems.Going publish stable version with storybook's 4x stable