<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gregminster</author_name>
  <author_url>https://blog.hatena.ne.jp/gregminster/</author_url>
  <blog_title>約束の地</blog_title>
  <blog_url>https://obel.hatenablog.jp/</blog_url>
  <categories>
    <anon>ソフトウェア開発</anon>
  </categories>
  <description>結論 マージしないと webpack 指定外の場所から import ができなくなります*1。 main.js の例 .storybook/main.js の例は、例えば以下のような感じです。 const path = require('path') module.exports = { // （途中省略） webpackFinal: async (config) =&gt; { config.resolve.alias = { ...config.resolve.alias, &quot;@&quot;: path.resolve(__dirname, '../src') } // （途中省略） return con…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobel.hatenablog.jp%2Fentry%2F20210503%2F1619982000&quot; title=&quot;Storybook の main.js 内で webpack の alias の設定をするときは「マージ」する - 約束の地&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/459657/1568741889764668</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-05-03 04:00:00</published>
  <title>Storybook の main.js 内で webpack の alias の設定をするときは「マージ」する</title>
  <type>rich</type>
  <url>https://obel.hatenablog.jp/entry/20210503/1619982000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
