<?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>プログラミング -&gt; 言語 -&gt; JavaScript</anon>
  </categories>
  <description>結論 標題のままとなります。dotenv を用いているファイルを webpack で bundle した場合、そのままですと dotenv が用いられません。そのため、dotenv-webpack を用いる必要があります。 やり方 1. dotenv-webpack をインストールします --dev オプションを付けてよいですが、ここでは割愛します。 $ npm install dotenv-webpack または $ yarn add dotenv-webpack 2. webpack.config.js に設定を書く require してから、plugins: に書き加えます。以下のように…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobel.hatenablog.jp%2Fentry%2F20200314%2F1584122400&quot; title=&quot;webpack で bundle したファイルの中で dotenv を使う場合には dotenv-webpack を用いる必要がある - 約束の地&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://raw.githubusercontent.com/webpack/media/master/logo/icon-square-big.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-03-14 03:00:00</published>
  <title>webpack で bundle したファイルの中で dotenv を使う場合には dotenv-webpack を用いる必要がある</title>
  <type>rich</type>
  <url>https://obel.hatenablog.jp/entry/20200314/1584122400</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
