I am using Storybook 5.2.0-alpha.29, it is loading my storybook with:
loading presets
loading custom addons config
loading custom webpack config (full-control mode)
loading create-react-app config
My .storybook/config.js looks like this:
import {addParameters} from '@storybook/react';
import {create} from '@storybook/theming';
import '!style-loader!css-loader!sass-loader!../src/app.scss';
import {load} from '@storybook/react';
import {DocsPage} from '@storybook/addon-docs/blocks';
addParameters({
docs: DocsPage,
options: {theme: create({sometheme})}
});
load(require.context('../src/stories', true, /\.stories\.tsx?$/), module)
load(require.context('../src/stories', true, /\.stories\.mdx$/), module)
.storybook/presets.js looks like this:
module.exports =["@storybook/addon-docs/react/preset"];
.storybook/webpack.config.js looks like this:
```const createCompiler = require('@storybook/addon-docs/mdx-compiler-plugin);
const path = require('path');
module.exports = async({config}) => {
config.module.rules.push({
enforce: "pre",
test: /.(ts|tsx)$/,
exclude: /node_modules/,
loader: "eslint-loader"
},{
test: /.(ts|tsx)$/,
loader: "babel-loader",
exclude: /node_modules/,
options: {
presets: ['@babel/preset-react', '@babel/preset-typescript']
}
});
return config
};
then in my src/stories/test.stories.mdx I have the following:
import {Story, Meta} from '@storybook/addon-docs/blocks';
```
I am using React, TypeScript and @[email protected]
Thanks @rezaabedian! Will take a look in the next hr! 馃檹
Thanks @rezaabedian! Will take a look in the next hr! 馃檹
Thank you! I was previously getting the error to do with mdx-loader and the
Hey @rezaabedian Try using the following presets.js setup:
module.exports = [
{
name: "@storybook/addon-docs/react/preset",
options: {
configureJSX: true
}
}
];
Does that work for you?
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Most helpful comment
Hey @rezaabedian Try using the following
presets.jssetup:Does that work for you?