Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cwd: process.cwd(),
} ),
shouldEmitStats &&
new BundleAnalyzerPlugin( {
analyzerMode: 'disabled', // just write the stats.json file
generateStatsFile: true,
statsFilename: path.join( __dirname, 'stats.json' ),
statsOptions: {
source: false,
reasons: shouldEmitStatsWithReasons,
optimizationBailout: false,
chunkOrigins: false,
chunkGroups: true,
},
} ),
shouldShowProgress && new IncrementalProgressPlugin(),
new MomentTimezoneDataPlugin( {
startYear: 2000,
cacheDir: path.join(
__dirname,
'build',
'.moment-timezone-data-webpack-plugin-cache',
extraPath
),
} ),
new ConfigFlagPlugin( {
flags: { desktop: config.isEnabled( 'desktop' ) },
} ),
isCalypsoClient && new InlineConstantExportsPlugin( /\/client\/state\/action-types.js$/ ),
isDevelopment && new webpack.HotModuleReplacementPlugin(),
] ),
externals: [ 'electron' ],