liferay-npm-bundler-preset-reactjs
Version:
liferay npm bundler preset react
35 lines (34 loc) • 1.25 kB
TypeScript
/**
* SPDX-FileCopyrightText: © 2020 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
import { Project } from '.';
import { BundlerCopyPluginState } from '../api/plugins';
import PkgDesc from '../pkg-desc';
import { BundlerPluginDescriptor } from './types';
/**
* Defines configuration for the copy step.
*/
export default class Copy {
constructor(project: Project);
/**
* Extra dependencies to add to the final bundle (in addition to those
* listed under the dependencies section of package.json).
*/
get includedDependencies(): string[];
/**
* Get the configured file exclusions for a given package.
* @param pkg the package descriptor
* @return an array of glob expressions (as defined by `globby`)
*/
getExclusions(pkg: PkgDesc): string[];
getPluginDescriptors(pkg: PkgDesc): BundlerPluginDescriptor<BundlerCopyPluginState>[];
/**
* Filters out dependencies to bundle based on the global bundler config
* @param dependencies array of dependency names
* @return an array of dependency names
*/
filterDependencies(dependencies: string[]): string[];
private _globalDependencyMap;
private readonly _project;
}