UNPKG

liferay-npm-bundler-preset-reactjs

Version:

liferay npm bundler preset react

24 lines (23 loc) 972 B
/** * SPDX-FileCopyrightText: © 2020 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: LGPL-3.0-or-later */ /** * Converts a package name (optionally versioned) to its target folder name * inside bundled node_modules. * @param name a package name * @param version an optional package version * @return the target folder */ export declare function getPackageTargetDir(name: string, version?: string): string; /** * Resolves a module name inside a package directory to a file relative (to * package directory) path. * For example, if you pass './lib' as moduleName and there's an 'index.js' file * inside the 'lib' dir, the method returns './lib/index.js'. * It also honors any 'package.json' with a 'main' entry in package subfolders. * @param pkgPath path to package directory * @param moduleName the module name * @return a path relative to pkgDir */ export declare function resolveModuleFile(pkgPath: string, moduleName: string): string;