Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const defaultConfig = (digestConfig: DigestConfig): webpack.Configuration[] => {
// TODO: optimize configs to share common instances and remove usage of just (use webpack-merge directly)
const bundle = webpackMerge(
webpackConfig,
htmlOverlay({
// TODO: is require.resolve really needed here? path.join / __dirname instead?
template: require.resolve('../assets/index.html'),
}),
{
// TODO: should entry really be pointing to lib output rather than ts?
// TODO: reduce to entry: string?
entry: {
digest: require.resolve('../lib/bundle/index.digest.js'),
},
mode: 'production',
output: {
filename: '[name].js',
},
resolve: {
alias: {
// TODO: this needs to work for both digest and consumer