Function: getPublicPath
▸ getPublicPath(options?
): string
Get Webpack's public path.
example
Usage in Webpack config:
import * as Repack from '@callstack/repack';
export default (env) => {
const {
platform,
devServer = undefined,
} = env;
return {
output: {
publicPath: Repack.getPublicPath({ platform, devServer }),
},
};
};
Parameters
Name |
Type |
Description |
options? |
GetPublicPathOptions |
Options object. |
Returns
string
Value for Webpack's output.publicPath
option.
Defined in
packages/repack/src/webpack/utils/getPublicPath.ts:38