<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Ortega on Medium]]></title>
        <description><![CDATA[Stories by David Ortega on Medium]]></description>
        <link>https://medium.com/@ortega-david-ar?source=rss-5e5949d1b11d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*cQyOWqmtmNNyoZ5z</url>
            <title>Stories by David Ortega on Medium</title>
            <link>https://medium.com/@ortega-david-ar?source=rss-5e5949d1b11d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 03:42:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ortega-david-ar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Storybook 6 + Gatsby (React 17)]]></title>
            <link>https://ortega-david-ar.medium.com/storybook-6-gatsby-react-17-57731b590da8?source=rss-5e5949d1b11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/57731b590da8</guid>
            <category><![CDATA[storybook]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[David Ortega]]></dc:creator>
            <pubDate>Fri, 30 Oct 2020 16:28:55 GMT</pubDate>
            <atom:updated>2020-10-30T16:32:42.260Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9DipBokQizdYdQDc" /><figcaption>Photo by <a href="https://unsplash.com/@flowforfrank?utm_source=medium&amp;utm_medium=referral">Ferenc Almasi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I spent a few hours trying to get this to work, I finally succeeded! Hope this helps people with the same problem, here are my files:</p><p>## Package.json</p><pre>{</pre><pre>&quot;name&quot;: &quot;webstore&quot;,</pre><pre>&quot;private&quot;: true,</pre><pre>&quot;description&quot;: &quot;Webstore, but with Gatsby&quot;,</pre><pre>&quot;version&quot;: &quot;1.0.0&quot;,</pre><pre>&quot;scripts&quot;: {</pre><pre>&quot;build&quot;: &quot;gatsby build&quot;,</pre><pre>&quot;develop&quot;: &quot;gatsby develop&quot;,</pre><pre>&quot;format&quot;: &quot;prettier --write \&quot;**/*.{js,jsx,ts,tsx,json,md}\&quot;&quot;,</pre><pre>&quot;mapdeps&quot;: &quot;depcruise --exclude &#39;^node_modules&#39; --output-type dot src | dot -T svg &gt; dependencygraph.svg&quot;,</pre><pre>&quot;start&quot;: &quot;npm run develop&quot;,</pre><pre>&quot;serve&quot;: &quot;gatsby serve&quot;,</pre><pre>&quot;clean&quot;: &quot;gatsby clean&quot;,</pre><pre>&quot;test&quot;: &quot;jest&quot;,</pre><pre>&quot;storybook&quot;: &quot;start-storybook -p 6006&quot;,</pre><pre>&quot;build-storybook&quot;: &quot;build-storybook&quot;</pre><pre>},</pre><pre>&quot;dependencies&quot;: {</pre><pre>&quot;@ant-design/icons&quot;: &quot;^4.2.2&quot;,</pre><pre>&quot;@apollo/client&quot;: &quot;^3.2.2&quot;,</pre><pre>&quot;classnames&quot;: &quot;^2.2.6&quot;,</pre><pre>&quot;cloudinary-react&quot;: &quot;^1.6.7&quot;,</pre><pre>&quot;flexboxgrid2&quot;: &quot;^7.2.1&quot;,</pre><pre>&quot;gatsby&quot;: &quot;^2.24.87&quot;,</pre><pre>&quot;gatsby-plugin-create-client-paths&quot;: &quot;^2.3.13&quot;,</pre><pre>&quot;gatsby-plugin-meta-redirect&quot;: &quot;^1.1.1&quot;,</pre><pre>&quot;gatsby-plugin-react-helmet&quot;: &quot;^3.3.13&quot;,</pre><pre>&quot;gatsby-plugin-react-svg&quot;: &quot;^3.0.0&quot;,</pre><pre>&quot;gatsby-plugin-sass&quot;: &quot;^2.3.16&quot;,</pre><pre>&quot;gatsby-source-graphql&quot;: &quot;^2.7.6&quot;,</pre><pre>&quot;graphql-tag&quot;: &quot;^2.11.0&quot;,</pre><pre>&quot;isomorphic-fetch&quot;: &quot;^3.0.0&quot;,</pre><pre>&quot;js-sha256&quot;: &quot;^0.9.0&quot;,</pre><pre>&quot;lodash&quot;: &quot;^4.17.20&quot;,</pre><pre>&quot;node-sass&quot;: &quot;^4.14.1&quot;,</pre><pre>&quot;rc-progress&quot;: &quot;^3.1.1&quot;,</pre><pre>&quot;react&quot;: &quot;^17.0.1&quot;,</pre><pre>&quot;react-accessible-accordion&quot;: &quot;^3.3.3&quot;,</pre><pre>&quot;react-dom&quot;: &quot;^17.0.1&quot;,</pre><pre>&quot;react-helmet&quot;: &quot;^6.1.0&quot;,</pre><pre>&quot;react-waypoint&quot;: &quot;^9.0.3&quot;,</pre><pre>&quot;reset-css&quot;: &quot;^5.0.1&quot;,</pre><pre>&quot;showdown&quot;: &quot;^1.9.1&quot;</pre><pre>},</pre><pre>&quot;devDependencies&quot;: {</pre><pre>&quot;@babel/core&quot;: &quot;^7.12.3&quot;,</pre><pre>&quot;@storybook/addon-actions&quot;: &quot;^6.0.28-alpha.3&quot;,</pre><pre>&quot;@storybook/addon-essentials&quot;: &quot;^6.0.28-alpha.3&quot;,</pre><pre>&quot;@storybook/addon-links&quot;: &quot;^6.0.28-alpha.3&quot;,</pre><pre>&quot;@storybook/react&quot;: &quot;^6.0.28-alpha.3&quot;,</pre><pre>&quot;@types/classnames&quot;: &quot;^2.2.10&quot;,</pre><pre>&quot;@types/isomorphic-fetch&quot;: &quot;0.0.35&quot;,</pre><pre>&quot;@types/jest&quot;: &quot;^26.0.14&quot;,</pre><pre>&quot;@types/react-helmet&quot;: &quot;^6.1.0&quot;,</pre><pre>&quot;antd&quot;: &quot;^4.7.3&quot;,</pre><pre>&quot;babel-jest&quot;: &quot;^26.6.1&quot;,</pre><pre>&quot;babel-loader&quot;: &quot;^8.1.0&quot;,</pre><pre>&quot;babel-preset-gatsby&quot;: &quot;^0.5.14&quot;,</pre><pre>&quot;dependency-cruiser&quot;: &quot;^9.15.0&quot;,</pre><pre>&quot;husky&quot;: &quot;^4.3.0&quot;,</pre><pre>&quot;identity-obj-proxy&quot;: &quot;^3.0.0&quot;,</pre><pre>&quot;jest&quot;: &quot;^26.6.1&quot;,</pre><pre>&quot;prettier&quot;: &quot;2.1.2&quot;,</pre><pre>&quot;react-is&quot;: &quot;^17.0.1&quot;,</pre><pre>&quot;react-test-renderer&quot;: &quot;^17.0.1&quot;,</pre><pre>&quot;typescript&quot;: &quot;^4.0.3&quot;</pre><pre>},</pre><pre>&quot;repository&quot;: {</pre><pre>&quot;type&quot;: &quot;git&quot;,</pre><pre>&quot;url&quot;: &quot;https://github.com/gatsbyjs/gatsby-starter-hello-world&quot;</pre><pre>},</pre><pre>&quot;bugs&quot;: {</pre><pre>&quot;url&quot;: &quot;https://github.com/gatsbyjs/gatsby/issues&quot;</pre><pre>},</pre><pre>&quot;husky&quot;: {</pre><pre>&quot;hooks&quot;: {</pre><pre>&quot;pre-commit&quot;: &quot;npm run format&quot;</pre><pre>}</pre><pre>}</pre><pre>}</pre><p>## preview.js</p><pre>import &quot;../src/styles/global.scss&quot;;</pre><pre>export const parameters = {</pre><pre>actions: { argTypesRegex: &quot;^on[A-Z].*&quot; },</pre><pre>layout: &quot;fullscreen&quot;,</pre><pre>};</pre><p>## main.js</p><pre>const path = require(&quot;path&quot;);</pre><pre>module.exports = {</pre><pre>stories: [&quot;../src/**/*.stories.mdx&quot;, &quot;../src/**/*.stories.@(js|jsx|ts|tsx)&quot;],</pre><pre>addons: [&quot;@storybook/addon-links&quot;, &quot;@storybook/addon-essentials&quot;],</pre><pre>webpackFinal: async (config, { configType }) =&gt; {</pre><pre>config.module.rules[0].exclude = [/node_modules\/(?!(gatsby)\/)/];</pre><pre>// Add Webpack rules for scss modules</pre><pre>// ========================================================</pre><pre>config.module.rules.push({</pre><pre>test: /\.scss$/,</pre><pre>use: [</pre><pre>&quot;style-loader&quot;,</pre><pre>{</pre><pre>loader: &quot;css-loader&quot;,</pre><pre>options: {</pre><pre>modules: true,</pre><pre>localIdentName: &quot;[name]_[local]_[hash:base64:5]&quot;,</pre><pre>importLoaders: 2,</pre><pre>camelCase: true,</pre><pre>sourceMap: false, // turned off as causes delay</pre><pre>},</pre><pre>},</pre><pre>&quot;sass-loader&quot;,</pre><pre>],</pre><pre>include: /\.module\.scss$/,</pre><pre>});</pre><pre>// Add Webpack rules for scss ans css</pre><pre>// ========================================================</pre><pre>config.module.rules.push({</pre><pre>test: /\.(scss|css)$/,</pre><pre>exclude: /\.module\.scss$/,</pre><pre>use: [&quot;style-loader&quot;, &quot;css-loader&quot;, &quot;sass-loader&quot;],</pre><pre>});</pre><pre>// Add Webpack rules for svg</pre><pre>// ========================================================</pre><pre>const fileLoaderRule = config.module.rules.find(</pre><pre>rule =&gt; rule.test &amp;&amp; rule.test.test(&quot;.svg&quot;)</pre><pre>);</pre><pre>fileLoaderRule.exclude = /\.svg$/;</pre><pre>config.module.rules.push({</pre><pre>test: /\.svg$/,</pre><pre>enforce: &quot;pre&quot;,</pre><pre>use: [&quot;@svgr/webpack&quot;],</pre><pre>exclude: /fonts\/.*\.svg/,</pre><pre>include: path.resolve(__dirname, &quot;../&quot;),</pre><pre>});</pre><pre>// Return the altered config</pre><pre>return config;</pre><pre>},</pre><pre>};</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57731b590da8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>