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




<p dir="auto"><strong>What is the current behavior?</strong><br>
<code class="notranslate">compiler.hooks.done</code> is undefined. <code class="notranslate">compiler.hooks.*</code> are all undefined.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\lib\BundleAnalyzerPlugin.js:90
      compiler.hooks.done.tapAsync('webpack-bundle-analyzer', done);
                          ^

TypeError: Cannot read property 'tapAsync' of undefined
    at BundleAnalyzerPlugin.apply (C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\
lib\BundleAnalyzerPlugin.js:90:27)
    at C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\ResolverFactory.js:314:10
    at Array.forEach (&lt;anonymous&gt;)
    at Object.exports.createResolver (C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\
ResolverFactory.js:313:10)
    at ResolverFactory._create (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory
.js:57:28)
    at ResolverFactory.get (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory.js:
49:28)
    at NormalModuleFactory.getResolver (C:\projects\myProjectPath\node_modules\webpack\lib\NormalM
oduleFactory.js:521:31)
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:165:32
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:129:4
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:400:5
    at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\nod
e_modules\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesWaterfallHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\li
b\Hook.js:154:20)
    at NormalModuleFactory.create (C:\projects\myProjectPath\node_modules\webpack\lib\NormalModule
Factory.js:381:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:1063:18
    at Semaphore.acquire (C:\projects\myProjectPath\node_modules\webpack\lib\util\Semaphore.js:29:
4)
    at Compilation._addModuleChain (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation
.js:1062:18)
    at Compilation.addEntry (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:116
4:8)
    at C:\projects\myProjectPath\node_modules\webpack\lib\SingleEntryPlugin.js:46:17
    at AsyncParallelHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modul
es\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:7:1)
    at AsyncParallelHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\lib\Hook.
js:154:20)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:669:20
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modules
\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\lib\Hook.js
:154:20)
    at Compiler.compile (C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:662:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:321:11
    at Compiler.readRecords (C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:529:11
)
T60273:[/c/projects/myProject]$ webpack
C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\lib\BundleAnalyzerPlugin.js:90
      compiler.hooks.done.tapAsync('webpack-bundle-analyzer', done);
                          ^

TypeError: Cannot read property 'tapAsync' of undefined
    at BundleAnalyzerPlugin.apply (C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\
lib\BundleAnalyzerPlugin.js:90:27)
    at C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\ResolverFactory.js:314:10
    at Array.forEach (&lt;anonymous&gt;)
    at Object.exports.createResolver (C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\
ResolverFactory.js:313:10)
    at ResolverFactory._create (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory
.js:57:28)
    at ResolverFactory.get (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory.js:
49:28)
    at NormalModuleFactory.getResolver (C:\projects\myProjectPath\node_modules\webpack\lib\NormalM
oduleFactory.js:521:31)
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:165:32
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:129:4
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:400:5
    at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\nod
e_modules\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesWaterfallHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\li
b\Hook.js:154:20)
    at NormalModuleFactory.create (C:\projects\myProjectPath\node_modules\webpack\lib\NormalModule
Factory.js:381:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:1063:18
    at Semaphore.acquire (C:\projects\myProjectPath\node_modules\webpack\lib\util\Semaphore.js:29:
4)
    at Compilation._addModuleChain (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation
.js:1062:18)
    at Compilation.addEntry (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:116
4:8)
    at C:\projects\myProjectPath\node_modules\webpack\lib\SingleEntryPlugin.js:46:17
    at AsyncParallelHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modul
es\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:7:1)
    at AsyncParallelHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\lib\Hook.
js:154:20)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:669:20
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modules
\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\projects\myProjectPath    at C:\projects\myProjectPath\node_modules\webpack\lib\Compi
ler.js:669:20
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\project
s\myProjectPath\node_modules\tapable\lib\HookCodeFactory.js:33:
10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\projects\myProjectPath
er\node_modules\tapable\lib\Hook.js:154:20)
    at Compiler.compile (C:\projects\myProjectPath\node_modules
\webpack\lib\Compiler.js:662:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compi
ler.js:321:11
    at Compiler.readRecords (C:\projects\myProjectPath\node_mod
ules\webpack\lib\Compiler.js:529:11)"><pre class="notranslate"><code class="notranslate">C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\lib\BundleAnalyzerPlugin.js:90
      compiler.hooks.done.tapAsync('webpack-bundle-analyzer', done);
                          ^

TypeError: Cannot read property 'tapAsync' of undefined
    at BundleAnalyzerPlugin.apply (C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\
lib\BundleAnalyzerPlugin.js:90:27)
    at C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\ResolverFactory.js:314:10
    at Array.forEach (&lt;anonymous&gt;)
    at Object.exports.createResolver (C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\
ResolverFactory.js:313:10)
    at ResolverFactory._create (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory
.js:57:28)
    at ResolverFactory.get (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory.js:
49:28)
    at NormalModuleFactory.getResolver (C:\projects\myProjectPath\node_modules\webpack\lib\NormalM
oduleFactory.js:521:31)
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:165:32
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:129:4
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:400:5
    at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\nod
e_modules\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesWaterfallHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\li
b\Hook.js:154:20)
    at NormalModuleFactory.create (C:\projects\myProjectPath\node_modules\webpack\lib\NormalModule
Factory.js:381:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:1063:18
    at Semaphore.acquire (C:\projects\myProjectPath\node_modules\webpack\lib\util\Semaphore.js:29:
4)
    at Compilation._addModuleChain (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation
.js:1062:18)
    at Compilation.addEntry (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:116
4:8)
    at C:\projects\myProjectPath\node_modules\webpack\lib\SingleEntryPlugin.js:46:17
    at AsyncParallelHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modul
es\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:7:1)
    at AsyncParallelHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\lib\Hook.
js:154:20)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:669:20
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modules
\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\lib\Hook.js
:154:20)
    at Compiler.compile (C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:662:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:321:11
    at Compiler.readRecords (C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:529:11
)
T60273:[/c/projects/myProject]$ webpack
C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\lib\BundleAnalyzerPlugin.js:90
      compiler.hooks.done.tapAsync('webpack-bundle-analyzer', done);
                          ^

TypeError: Cannot read property 'tapAsync' of undefined
    at BundleAnalyzerPlugin.apply (C:\projects\myProjectPath\node_modules\webpack-bundle-analyzer\
lib\BundleAnalyzerPlugin.js:90:27)
    at C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\ResolverFactory.js:314:10
    at Array.forEach (&lt;anonymous&gt;)
    at Object.exports.createResolver (C:\projects\myProjectPath\node_modules\enhanced-resolve\lib\
ResolverFactory.js:313:10)
    at ResolverFactory._create (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory
.js:57:28)
    at ResolverFactory.get (C:\projects\myProjectPath\node_modules\webpack\lib\ResolverFactory.js:
49:28)
    at NormalModuleFactory.getResolver (C:\projects\myProjectPath\node_modules\webpack\lib\NormalM
oduleFactory.js:521:31)
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:165:32
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:129:4
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at handleExternal (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlu
gin.js:28:34)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:103:26
    at next (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:65:
43)
    at handleExternals (C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPl
ugin.js:71:7)
    at C:\projects\myProjectPath\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5
    at C:\projects\myProjectPath\node_modules\webpack\lib\NormalModuleFactory.js:400:5
    at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\nod
e_modules\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesWaterfallHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\li
b\Hook.js:154:20)
    at NormalModuleFactory.create (C:\projects\myProjectPath\node_modules\webpack\lib\NormalModule
Factory.js:381:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:1063:18
    at Semaphore.acquire (C:\projects\myProjectPath\node_modules\webpack\lib\util\Semaphore.js:29:
4)
    at Compilation._addModuleChain (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation
.js:1062:18)
    at Compilation.addEntry (C:\projects\myProjectPath\node_modules\webpack\lib\Compilation.js:116
4:8)
    at C:\projects\myProjectPath\node_modules\webpack\lib\SingleEntryPlugin.js:46:17
    at AsyncParallelHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modul
es\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:7:1)
    at AsyncParallelHook.lazyCompileHook (C:\projects\myProjectPath\node_modules\tapable\lib\Hook.
js:154:20)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compiler.js:669:20
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\projects\myProjectPath\node_modules
\tapable\lib\HookCodeFactory.js:33:10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\projects\myProjectPath    at C:\projects\myProjectPath\node_modules\webpack\lib\Compi
ler.js:669:20
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\project
s\myProjectPath\node_modules\tapable\lib\HookCodeFactory.js:33:
10), &lt;anonymous&gt;:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\projects\myProjectPath
er\node_modules\tapable\lib\Hook.js:154:20)
    at Compiler.compile (C:\projects\myProjectPath\node_modules
\webpack\lib\Compiler.js:662:28)
    at C:\projects\myProjectPath\node_modules\webpack\lib\Compi
ler.js:321:11
    at Compiler.readRecords (C:\projects\myProjectPath\node_mod
ules\webpack\lib\Compiler.js:529:11)
</code></pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
<a href="https://github.com/valscion/webpack-bundle-analyzer-issue-333">https://github.com/valscion/webpack-bundle-analyzer-issue-333</a></p>






<p dir="auto"><strong>What is the expected behavior?</strong><br>
<code class="notranslate">compiler.hooks.done.tapAsync</code> should exist on <code class="notranslate">compiler.hooks</code></p>


<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:  4.41.6<br>
Node.js version: 12.12.28<br>
Operating System: Same behavior macOS Catalina and Windows 10<br>
Additional tools:</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="568019654" data-permission-text="Title is private" data-url="https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/333" data-hovercard-type="issue" data-hovercard-url="/webpack-contrib/webpack-bundle-analyzer/issues/333/hovercard" href="https://github.com/webpack-contrib/webpack-bundle-analyzer/issues/333">webpack-contrib/webpack-bundle-analyzer#333</a></li>
<li><a href="https://github.com/valscion/webpack-bundle-analyzer-issue-333">https://github.com/valscion/webpack-bundle-analyzer-issue-333</a></li>
</ul>
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">Writing Webpack v5 configuration methods cannot be typed correctly:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function vendors({ mode }: { mode: string }): Configuration {
  return {
    mode,    // Type 'string' is not assignable to type 'Mode'.ts(2322)
    entry: {
      vendor: [npmExportsFile],
    },
    output: {
      filename: '[name].[contenthash:8].packages.js',
      library: '[name]_packages',
      path: OUTPUT_DIR,
      publicPath: PUBLIC_PATH,
    },
    plugins: [
      new webpack.DllPlugin({
        name: '[name]',
        path: path.join(OUTPUT_DIR, '[name].json'),
      }),
    ],
  }
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">vendors</span><span class="pl-kos">(</span><span class="pl-kos">{</span> mode <span class="pl-kos">}</span>: <span class="pl-kos">{</span> <span class="pl-c1">mode</span>: <span class="pl-smi">string</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-smi">Configuration</span> <span class="pl-kos">{</span>
  <span class="pl-k">return</span> <span class="pl-kos">{</span>
    mode<span class="pl-kos">,</span>    <span class="pl-c">// Type 'string' is not assignable to type 'Mode'.ts(2322)</span>
    <span class="pl-c1">entry</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">vendor</span>: <span class="pl-kos">[</span><span class="pl-s1">npmExportsFile</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">output</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">filename</span>: <span class="pl-s">'[name].[contenthash:8].packages.js'</span><span class="pl-kos">,</span>
      <span class="pl-c1">library</span>: <span class="pl-s">'[name]_packages'</span><span class="pl-kos">,</span>
      <span class="pl-c1">path</span>: <span class="pl-smi">OUTPUT_DIR</span><span class="pl-kos">,</span>
      <span class="pl-c1">publicPath</span>: <span class="pl-smi">PUBLIC_PATH</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
      <span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">DllPlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
        <span class="pl-c1">name</span>: <span class="pl-s">'[name]'</span><span class="pl-kos">,</span>
        <span class="pl-c1">path</span>: <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-smi">OUTPUT_DIR</span><span class="pl-kos">,</span> <span class="pl-s">'[name].json'</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-kos">}</span></pre></div>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Because <code class="notranslate">Mode</code> is not exported, it can't be used as the type in the above type signature instead of <code class="notranslate">string</code> here</p>
<p dir="auto"><strong>Other relevant information:</strong></p>
<p dir="auto">webpack version:  5.4.0<br>
Node.js version: 15.1.0<br>
Operating System: Linux x86_64<br>
Additional tools: Typescript v4.0.5</p>