Conditional filename in webpack config output
<p>my current webpack output config is as follows:</p>

<pre><code>output: {
    path: PATHS.build,
    filename: '/[name].[chunkhash].js',
    chunkFilename: '/[chunkhash].js'
}
</code></pre>

<p>However, I have one entry file (custom.js) that I don't want to add [chunkhash] suffix. all others I do want to add the chuckhash suffix after the file name. Essentially:</p>

<pre class="lang-js prettyprint-override"><code>if (name is 'custom') {
    filename: '/[name].js'
} else {
    filename: '/[name].[chunkhash].js'
}
</code></pre>

<p><strong>How can I achieve this?</strong> </p>