fix: cast bundle analyzer plugin type

This commit is contained in:
Marc-Roig 2023-11-14 14:55:02 +01:00
parent 28d0d5434a
commit 6daaab5d7a
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249

View File

@ -196,8 +196,8 @@ const resolveProductionConfig = async (ctx: BuildContext): Promise<Configuration
chunkFilename: '[name].[chunkhash].chunkhash.css',
ignoreOrder: true,
}),
ctx.options.stats && new BundleAnalyzerPlugin(),
].filter(Boolean) as WebpackPluginInstance[], // TODO: find out if this is an actual issue or just a ts bug
ctx.options.stats && (new BundleAnalyzerPlugin() as unknown as WebpackPluginInstance), // TODO: find out if this is an actual issue or just a ts bug
].filter(Boolean),
};
};