UNPKG

@expo/webpack-config

Version:

The default Webpack configuration used to build Expo apps targeting the web.

29 lines (28 loc) 991 B
import { ExpoConfig } from '@expo/config'; import { AnyConfiguration, Environment } from '../types'; /** * @internal */ export declare const DEFAULT_GZIP_OPTIONS: { test: RegExp; filename: string; algorithm: string; threshold: number; minRatio: number; }; /** * Add production compression options to the provided Webpack config. * * @param webpackConfig Existing Webpack config to modify. * @param env Environment used for getting the Expo project config. * @category addons */ export default function withCompression(webpackConfig: AnyConfiguration, env: Pick<Environment, 'projectRoot' | 'mode' | 'config' | 'locations'>): AnyConfiguration; /** * Add Gzip compression to the provided Webpack config. * * @param webpackConfig Existing Webpack config to modify. * @param expoConfig Expo config with compression options. * @internal */ export declare function addCompressionPlugins(webpackConfig: AnyConfiguration, expoConfig: ExpoConfig): AnyConfiguration;