<h1 dir="auto">Bug report</h1>




<p dir="auto"><strong>What is the current behavior?</strong><br>
I created <code class="notranslate">childCompiler</code> at <code class="notranslate">parentCompiler.hook.make</code> stage and I called <code class="notranslate">runAsChild</code> at <code class="notranslate">parentCompiler.hook.emit</code> stage. <code class="notranslate">childCompilation.assets</code> are nothing. I do not see any compilation.</p>
<p dir="auto">Parent compilation is based on <code class="notranslate">web.webpack.config.js</code> whose target is <code class="notranslate">web</code>. Child compilation is based on another <code class="notranslate">webworker.webpack.config.js</code> whose target is <code class="notranslate">webworker</code>.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">web.webpack.config.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;plugins&quot;: [
    new WorkboxPlugin(require(&quot;./webworker.webpack.config.js&quot;)(env, argv))
  ],
  &quot;target&quot;: &quot;web&quot;
]"><pre class="notranslate"><span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
    <span class="pl-k">new</span> <span class="pl-v">WorkboxPlugin</span><span class="pl-kos">(</span><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./webworker.webpack.config.js"</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-s1">env</span><span class="pl-kos">,</span> <span class="pl-s1">argv</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-s">"target"</span>: <span class="pl-s">"web"</span>
<span class="pl-kos">]</span></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {DefinePlugin, WebpackOptionsApply, WebpackOptionsDefaulter} = require(&quot;webpack&quot;);
const NAME = &quot;webworker-injection&quot;;

module.exports = class WorkboxPlugin {
  constructor(options) {
    this.options = new WebpackOptionsDefaulter().process(options);
  }

  apply(compiler) {
    const self = this;
    let childCompiler = null;

    debugHooks(compiler, NAME);

    compiler.hooks.emit.tapAsync(NAME, (compilation, callback) =&gt; {
      const stats = compilation.getStats().toJson();
      new DefinePlugin({
        &quot;__PRECACHE_MANIFEST__&quot;: JSON.stringify({}),
      }).apply(childCompiler);
      childCompiler.runAsChild((err, entries, childCompilation) =&gt; {
        console.log(childCompilation.getStats().toJson()); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this has nothing
        callback(err);
      })
    });

    compiler.hooks.make.tapAsync(NAME, (compilation, callback) =&gt; {
      childCompiler = compilation.createChildCompiler(&quot;child&quot;, self.options.output);
      childCompiler.options = new WebpackOptionsApply().process(self.options, childCompiler);
      childCompiler.context = compiler.context;
      debugHooks(childCompiler, &quot;child&quot;);
      callback();
    });
  }
}

const debugHooks = (target, from) =&gt; {
  for (let hook in target.hooks) {
    if (target.hooks[hook].constructor.name.startsWith(&quot;Async&quot;)) {
      target.hooks[hook].tapAsync(from, (...args) =&gt; {
        console.log(`${hook}.${from}`);
        args[args.length - 1]();
      });
    } else {
      target.hooks[hook].tap(from, () =&gt; {
        console.log(`${hook}.${from}`);
      });
    }
  }
}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>DefinePlugin<span class="pl-kos">,</span> WebpackOptionsApply<span class="pl-kos">,</span> WebpackOptionsDefaulter<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"webpack"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-c1">NAME</span> <span class="pl-c1">=</span> <span class="pl-s">"webworker-injection"</span><span class="pl-kos">;</span>

<span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-v">WorkboxPlugin</span> <span class="pl-kos">{</span>
  <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">options</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">options</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">WebpackOptionsDefaulter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">process</span><span class="pl-kos">(</span><span class="pl-s1">options</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>

  <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">compiler</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">const</span> <span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> <span class="pl-s1">childCompiler</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">;</span>

    <span class="pl-en">debugHooks</span><span class="pl-kos">(</span><span class="pl-s1">compiler</span><span class="pl-kos">,</span> <span class="pl-c1">NAME</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">emit</span><span class="pl-kos">.</span><span class="pl-en">tapAsync</span><span class="pl-kos">(</span><span class="pl-c1">NAME</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">compilation</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
      <span class="pl-k">const</span> <span class="pl-s1">stats</span> <span class="pl-c1">=</span> <span class="pl-s1">compilation</span><span class="pl-kos">.</span><span class="pl-en">getStats</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toJson</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-k">new</span> <span class="pl-v">DefinePlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
        <span class="pl-s">"__PRECACHE_MANIFEST__"</span>: <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">childCompiler</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-en">runAsChild</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">,</span> <span class="pl-s1">entries</span><span class="pl-kos">,</span> <span class="pl-s1">childCompilation</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">childCompilation</span><span class="pl-kos">.</span><span class="pl-en">getStats</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toJson</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;</span> <span class="pl-s1">this</span> <span class="pl-c1">has</span> <span class="pl-c1">nothing</span>
        <span class="pl-c1">callback</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span><span class="pl-kos">)</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">.</span><span class="pl-c1">make</span><span class="pl-kos">.</span><span class="pl-en">tapAsync</span><span class="pl-kos">(</span><span class="pl-c1">NAME</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">compilation</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
      <span class="pl-s1">childCompiler</span> <span class="pl-c1">=</span> <span class="pl-s1">compilation</span><span class="pl-kos">.</span><span class="pl-en">createChildCompiler</span><span class="pl-kos">(</span><span class="pl-s">"child"</span><span class="pl-kos">,</span> <span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-c1">options</span><span class="pl-kos">.</span><span class="pl-c1">output</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-c1">options</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">WebpackOptionsApply</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">process</span><span class="pl-kos">(</span><span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-c1">options</span><span class="pl-kos">,</span> <span class="pl-s1">childCompiler</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-c1">context</span> <span class="pl-c1">=</span> <span class="pl-s1">compiler</span><span class="pl-kos">.</span><span class="pl-c1">context</span><span class="pl-kos">;</span>
      <span class="pl-en">debugHooks</span><span class="pl-kos">(</span><span class="pl-s1">childCompiler</span><span class="pl-kos">,</span> <span class="pl-s">"child"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-s1">callback</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">const</span> <span class="pl-en">debugHooks</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">,</span> <span class="pl-s1">from</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">hook</span> <span class="pl-k">in</span> <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">[</span><span class="pl-s1">hook</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">.</span><span class="pl-en">startsWith</span><span class="pl-kos">(</span><span class="pl-s">"Async"</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">[</span><span class="pl-s1">hook</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">tapAsync</span><span class="pl-kos">(</span><span class="pl-s1">from</span><span class="pl-kos">,</span> <span class="pl-kos">(</span>...<span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">hook</span><span class="pl-kos">}</span></span>.<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">from</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-s1">args</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">-</span> <span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
      <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">hooks</span><span class="pl-kos">[</span><span class="pl-s1">hook</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">tap</span><span class="pl-kos">(</span><span class="pl-s1">from</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">hook</span><span class="pl-kos">}</span></span>.<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">from</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5212215/59151491-f8236d00-89e8-11e9-9086-b9f26db20816.png"><img src="https://user-images.githubusercontent.com/5212215/59151491-f8236d00-89e8-11e9-9086-b9f26db20816.png" alt="image" style="max-width: 100%;"></a></p>






<p dir="auto"><strong>What is the expected behavior?</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="childCompiler.runAsChild((err, entries, childCompilation) =&gt; {
  console.log(childCompilation.getStats().toJson()); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this should have something
  callback(err);
});"><pre class="notranslate"><span class="pl-s1">childCompiler</span><span class="pl-kos">.</span><span class="pl-en">runAsChild</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">,</span> <span class="pl-s1">entries</span><span class="pl-kos">,</span> <span class="pl-s1">childCompilation</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">childCompilation</span><span class="pl-kos">.</span><span class="pl-en">getStats</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toJson</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;</span> <span class="pl-s1">this</span> <span class="pl-c1">should</span> <span class="pl-c1">have</span> <span class="pl-c1">something</span>
  <span class="pl-c1">callback</span><span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>


<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:  4.30<br>
Node.js version: 12.3.1<br>
Operating System: macOS 10.14.5<br>
Additional tools:</p>
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
I can see a new feature called dependOn is added to webpack which fits in rightly for my requirement. As I moved my webpack version from 4.43.0 to 5.0.0-beta.16, for some reasons the transformation of arrow function in bundle.js is not happening.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
Let me share my configurations.</p>
<p dir="auto"><strong>Package.json</strong></p>
<p dir="auto">`</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;name&quot;: &quot;root&quot;,
  &quot;private&quot;: true,
  &quot;workspaces&quot;: [
    &quot;compositions/*&quot;
  ],
  &quot;dependencies&quot;: {
    &quot;classnames&quot;: &quot;^2.2.6&quot;,
    &quot;core-js&quot;: &quot;3&quot;,
    &quot;react&quot;: &quot;^16.10.2&quot;,
    &quot;react-dom&quot;: &quot;^16.10.2&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@babel/cli&quot;: &quot;^7.8.4&quot;,
    &quot;@babel/core&quot;: &quot;^7.9.6&quot;,
    &quot;@babel/plugin-proposal-class-properties&quot;: &quot;^7.8.3&quot;,
    &quot;@babel/plugin-transform-runtime&quot;: &quot;^7.9.6&quot;,
    &quot;@babel/polyfill&quot;: &quot;^7.8.7&quot;,
    &quot;@babel/preset-env&quot;: &quot;^7.9.6&quot;,
    &quot;@babel/preset-react&quot;: &quot;^7.9.4&quot;,
    &quot;@emcm-ui/stylelint-config&quot;: &quot;^1.2.2&quot;,
    &quot;@storybook/react&quot;: &quot;^5.3.18&quot;,
    &quot;babel-core&quot;: &quot;7.0.0-bridge.0&quot;,
    &quot;babel-loader&quot;: &quot;^8.1.0&quot;,
    &quot;babel-plugin-styled-components&quot;: &quot;^1.10.7&quot;,
    &quot;babel-polyfill&quot;: &quot;^6.26.0&quot;,
    &quot;compression-webpack-plugin&quot;: &quot;^3.1.0&quot;,
    &quot;css-loader&quot;: &quot;^3.5.3&quot;,
    &quot;duplicate-package-checker-webpack-plugin&quot;: &quot;^3.0.0&quot;,
    &quot;es6-promise&quot;: &quot;^4.2.8&quot;,
    &quot;eslint&quot;: &quot;^6.8.0&quot;,
    &quot;fs-extra&quot;: &quot;^9.0.0&quot;,
    &quot;isomorphic-fetch&quot;: &quot;^2.2.1&quot;,
    &quot;lerna&quot;: &quot;^3.20.2&quot;,
    &quot;mini-css-extract-plugin&quot;: &quot;^0.9.0&quot;,
    &quot;module&quot;: &quot;^1.2.5&quot;,
    &quot;npm-run-all&quot;: &quot;^4.1.5&quot;,
    &quot;postcss&quot;: &quot;^7.0.27&quot;,
    &quot;postcss-calc&quot;: &quot;^7.0.2&quot;,
    &quot;postcss-css-variables&quot;: &quot;^0.17.0&quot;,
    &quot;prettier&quot;: &quot;^1.19.1&quot;,
    &quot;reduce-css-calc&quot;: &quot;^2.1.7&quot;,
    &quot;regenerator-runtime&quot;: &quot;^0.13.5&quot;,
    &quot;style-loader&quot;: &quot;^1.2.1&quot;,
    &quot;uglifyjs-webpack-plugin&quot;: &quot;^2.2.0&quot;,
    &quot;webpack&quot;: &quot;5.0.0-beta.16&quot;,
    &quot;webpack-bundle-analyzer&quot;: &quot;^3.6.0&quot;,
    &quot;webpack-cli&quot;: &quot;^3.3.11&quot;
  },
  &quot;scripts&quot;: {
    &quot;build&quot;: &quot;yarn format &amp;&amp; webpack --mode production&quot;,
    &quot;start&quot;: &quot;start-storybook -p 5555&quot;,
    &quot;npmScript&quot;: &quot;webpack --mode production&quot;,
    &quot;postcss&quot;: &quot;node scripts/buildVars.js&quot;,
    &quot;cleanup&quot;: &quot;./cleanup.sh&quot;,
    &quot;format&quot;: &quot;yarn internal:prettier \&quot;./*.{js,jsx,json,md}\&quot; \&quot;./**/*.{js,jsx,json,md}\&quot; --write&quot;,
    &quot;internal:lint:js&quot;: &quot;eslint --ext .js,.jsx --ignore-path .eslintignore&quot;,
    &quot;internal:prettier&quot;: &quot;prettier&quot;,
    &quot;lint&quot;: &quot;npm-run-all lint:*&quot;,
    &quot;lint:format&quot;: &quot;yarn internal:prettier --list-different \&quot;./*.{js,jsx,json,md}\&quot; \&quot;./**/*.{js,jsx,json,md}\&quot;&quot;,
    &quot;lint:js&quot;: &quot;yarn internal:lint:js .&quot;,
    &quot;lint:js:fix&quot;: &quot;yarn internal:lint:js . --fix&quot;
  }
}
"><pre class="notranslate"><code class="notranslate">{
  "name": "root",
  "private": true,
  "workspaces": [
    "compositions/*"
  ],
  "dependencies": {
    "classnames": "^2.2.6",
    "core-js": "3",
    "react": "^16.10.2",
    "react-dom": "^16.10.2"
  },
  "devDependencies": {
    "@babel/cli": "^7.8.4",
    "@babel/core": "^7.9.6",
    "@babel/plugin-proposal-class-properties": "^7.8.3",
    "@babel/plugin-transform-runtime": "^7.9.6",
    "@babel/polyfill": "^7.8.7",
    "@babel/preset-env": "^7.9.6",
    "@babel/preset-react": "^7.9.4",
    "@emcm-ui/stylelint-config": "^1.2.2",
    "@storybook/react": "^5.3.18",
    "babel-core": "7.0.0-bridge.0",
    "babel-loader": "^8.1.0",
    "babel-plugin-styled-components": "^1.10.7",
    "babel-polyfill": "^6.26.0",
    "compression-webpack-plugin": "^3.1.0",
    "css-loader": "^3.5.3",
    "duplicate-package-checker-webpack-plugin": "^3.0.0",
    "es6-promise": "^4.2.8",
    "eslint": "^6.8.0",
    "fs-extra": "^9.0.0",
    "isomorphic-fetch": "^2.2.1",
    "lerna": "^3.20.2",
    "mini-css-extract-plugin": "^0.9.0",
    "module": "^1.2.5",
    "npm-run-all": "^4.1.5",
    "postcss": "^7.0.27",
    "postcss-calc": "^7.0.2",
    "postcss-css-variables": "^0.17.0",
    "prettier": "^1.19.1",
    "reduce-css-calc": "^2.1.7",
    "regenerator-runtime": "^0.13.5",
    "style-loader": "^1.2.1",
    "uglifyjs-webpack-plugin": "^2.2.0",
    "webpack": "5.0.0-beta.16",
    "webpack-bundle-analyzer": "^3.6.0",
    "webpack-cli": "^3.3.11"
  },
  "scripts": {
    "build": "yarn format &amp;&amp; webpack --mode production",
    "start": "start-storybook -p 5555",
    "npmScript": "webpack --mode production",
    "postcss": "node scripts/buildVars.js",
    "cleanup": "./cleanup.sh",
    "format": "yarn internal:prettier \"./*.{js,jsx,json,md}\" \"./**/*.{js,jsx,json,md}\" --write",
    "internal:lint:js": "eslint --ext .js,.jsx --ignore-path .eslintignore",
    "internal:prettier": "prettier",
    "lint": "npm-run-all lint:*",
    "lint:format": "yarn internal:prettier --list-different \"./*.{js,jsx,json,md}\" \"./**/*.{js,jsx,json,md}\"",
    "lint:js": "yarn internal:lint:js .",
    "lint:js:fix": "yarn internal:lint:js . --fix"
  }
}

</code></pre></div>
<p dir="auto">`</p>
<p dir="auto"><strong>webpack.config.js</strong></p>
<p dir="auto">`</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const path = require(&quot;path&quot;);
const BundleAnalyzerPlugin = require(&quot;webpack-bundle-analyzer&quot;)
  .BundleAnalyzerPlugin;
const DuplicatePackageCheckerPlugin = require(&quot;duplicate-package-checker-webpack-plugin&quot;);
const webpack = require(&quot;webpack&quot;);
const getPackages = require(&quot;./scripts/getPackages&quot;);
const localPackage = require(&quot;./package.json&quot;);
const MiniCssExtractPlugin = require(&quot;mini-css-extract-plugin&quot;);
const UglifyJsPlugin = require(&quot;uglifyjs-webpack-plugin&quot;);

module.exports = {
  entry: {
    icons: path.resolve(__dirname, &quot;node_modules&quot;, &quot;@emcm-ui/icons&quot;)
  },
  output: {
    filename: &quot;[name].js&quot;
  },
  devServer: {
    inline: true,
    port: 3002
  },
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /(node_modules|bower_components)/,
        use: {
          loader: &quot;babel-loader&quot;,
          options: {
            presets: [
              [
                &quot;@babel/preset-env&quot;,
                {
                  useBuiltIns: &quot;entry&quot;,
                  corejs: { version: 3, proposals: true }
                }
              ],
              &quot;@babel/preset-react&quot;
            ],
            plugins: [
              &quot;@babel/plugin-proposal-class-properties&quot;,
              &quot;@babel/plugin-transform-arrow-functions&quot;,
              &quot;@babel/plugin-transform-runtime&quot;
            ]
          }
        }
      },
      {
        test: /\.css$/,
        use: [
          // This is executed in reverse order #important
          MiniCssExtractPlugin.loader,
          // &quot;style-loader&quot;,
          &quot;css-loader&quot; // this is used to understand the import statement in js for css
        ]
      }
    ]
  },
  plugins: [
    new BundleAnalyzerPlugin({
      analyzerMode: &quot;static&quot;,
      generateStatsFile: true,
      openAnalyzer: false,
      statsOptions: {
        source: false
      }
    }),
    new MiniCssExtractPlugin({
      // Options similar to the same options in webpackOptions.output
      // both options are optional
      filename: &quot;[name].css&quot;
    }),
    new DuplicatePackageCheckerPlugin()
  ]
};
`

**polyfill.js**

`
import &quot;regenerator-runtime/runtime&quot;;
import &quot;core-js/es&quot;;
import &quot;isomorphic-fetch&quot;;
import es6Promise from &quot;es6-promise&quot;;

es6Promise.polyfill();"><pre class="notranslate"><code class="notranslate">const path = require("path");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
  .BundleAnalyzerPlugin;
const DuplicatePackageCheckerPlugin = require("duplicate-package-checker-webpack-plugin");
const webpack = require("webpack");
const getPackages = require("./scripts/getPackages");
const localPackage = require("./package.json");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");

module.exports = {
  entry: {
    icons: path.resolve(__dirname, "node_modules", "@emcm-ui/icons")
  },
  output: {
    filename: "[name].js"
  },
  devServer: {
    inline: true,
    port: 3002
  },
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /(node_modules|bower_components)/,
        use: {
          loader: "babel-loader",
          options: {
            presets: [
              [
                "@babel/preset-env",
                {
                  useBuiltIns: "entry",
                  corejs: { version: 3, proposals: true }
                }
              ],
              "@babel/preset-react"
            ],
            plugins: [
              "@babel/plugin-proposal-class-properties",
              "@babel/plugin-transform-arrow-functions",
              "@babel/plugin-transform-runtime"
            ]
          }
        }
      },
      {
        test: /\.css$/,
        use: [
          // This is executed in reverse order #important
          MiniCssExtractPlugin.loader,
          // "style-loader",
          "css-loader" // this is used to understand the import statement in js for css
        ]
      }
    ]
  },
  plugins: [
    new BundleAnalyzerPlugin({
      analyzerMode: "static",
      generateStatsFile: true,
      openAnalyzer: false,
      statsOptions: {
        source: false
      }
    }),
    new MiniCssExtractPlugin({
      // Options similar to the same options in webpackOptions.output
      // both options are optional
      filename: "[name].css"
    }),
    new DuplicatePackageCheckerPlugin()
  ]
};
`

**polyfill.js**

`
import "regenerator-runtime/runtime";
import "core-js/es";
import "isomorphic-fetch";
import es6Promise from "es6-promise";

es6Promise.polyfill();
</code></pre></div>
<p dir="auto">`</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
I should see my bundle.js transformed into without arrow function in them as most of the browsers cannot read them. The same works when I downgrade my webpack version to 4.43.0</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:  5.0.0-beta.16<br>
Node.js version: v12.16.2<br>
Operating System: Windows 32<br>
Additional tools: VSCode</p>
<p dir="auto">Any help would be appreciated</p>