import { Configuration } from 'webpack' ; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' ; import { BuildContext } from '@reskript/config-webpack' ; export const analyze = ( context ) : Configuration => ( context . isDefaultTarget ? { plugins : [ new BundleAnalyzerPlugin ( { analyzerMode : 'static' , generateStatsFile : true } ) as any , ] , } : { } ) ; export const profile = ( ) : Configuration => { return { resolve : { alias : { 'react-dom$' : 'react-dom/profiling' , 'scheduler/tracing' : 'scheduler/tracing-profiling' , } , } , } ; } ; export const noSourceMaps = ( ) : Configuration => { return { devtool : false , } ; } ;