UNPKG

@expo/webpack-config

Version:

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

24 lines (23 loc) 1.22 kB
import { Environment, FilePaths } from '../types'; export declare function getPaths(projectRoot: string): FilePaths; export declare function getPathsAsync(projectRoot: string): Promise<FilePaths>; export declare function getServedPath(projectRoot: string): string; export declare function getPublicPaths({ projectRoot, ...env }: Pick<Environment, 'mode' | 'projectRoot'>): { /** * Webpack uses `publicPath` to determine where the app is being served from. * It requires a trailing slash, or the file assets will get an incorrect path. * In development, we always serve from the root. This makes config easier. */ publicPath: string; /** * `publicUrl` is just like `publicPath`, but we will provide it to our app * as %WEB_PUBLIC_URL% in `index.html` and `process.env.WEB_PUBLIC_URL` in JavaScript. * Omit trailing slash as %WEB_PUBLIC_URL%/xyz looks better than %WEB_PUBLIC_URL%xyz. */ publicUrl: string; }; export declare function getProductionPath(projectRoot: string): string; /** * get absolute path relative to project root while accounting for `https://` paths */ export declare function getAbsolute(projectRoot: string, ...pathComponents: string[]): string;