So, I need to generate a report and stats file containing only source files and no node_modules/vendor/third party. Tried that from both excludeAssets and exclude array within statOptions but no luck. How can one accomplish that? Thanks in advance!
How do you use this module? As CLI utility or as plugin?
Plugin
new BundleAnalyzerPlugin({
excludeAssets: ['node_modules', 'dev', 'vendor'],
generateStatsFile: true,
statsOptions: {
exclude: ['node_modules', 'dev', 'vendor'],
hash: false,
cached: false,
cachedAssets: false,
reasons: false,
source: true,
warnings: false,
errors: false,
errorDetails: false,
publicPath: false,
modulesSort: 'size',
chunksSort: 'size',
assetsSort: 'size'
}
})
What other Webpack plugins were used?
None
{
statsOptions: {
exclude: /node_modules/
}
}
works for me.
{ statsOptions: { exclude: /node_modules/ } }works for me.
also work for me
Great! Then this is resolved.
Most helpful comment
works for me.