UNPKG

@omnia/tooling-composers

Version:

Provide tooling to work with manifest things.

104 lines (103 loc) 3.21 kB
import { GuidValue } from '@omnia/fx-models'; export interface BuildOptions { /** * enable tree shaking for dead-code elimination. */ enableTreeShaking?: boolean; /** * it will disable auto add manifest dependencies. */ disableAutoAddManifestDependency?: boolean; /** * Set options to bundle process. * Usage: bundleOptions:{...} */ bundleOptions?: BundleOptions; /** * Set options to module process. * Usage: moduleOptions:{...} */ moduleOptions?: ModuleOptions; /** * Set options to detect circular dependency process. */ detectCircularDependencyOptions?: CircularDependencyOptions; /** * Specifies a list glob patterns that match files *.manifest.ts to be included in compilation. * Usage: include:["client"] */ include?: Array<string>; /** * Specifies a list external reference manifest metadata files. * Usage: reference:["omnia.vendor.manifest.json"] */ reference?: Array<string>; /** * Prevent webpack from parsing any files matching the given regular expression(s). * Ignored files should not have calls to import, require, define or any other importing mechanism. * This can boost build performance when ignoring large libraries. */ noParse?: RegExp | ((resource: any) => string) | string[]; /** * Used to detect duplicated bundle. That enable by default */ detectDuplicatedBundle?: boolean; /** * Enable it when want to share wc manifest bundle. Default is false. */ allowShareWCManifestBundle?: boolean; /** * Generate all stuffs to the folder path */ outDir?: string; } export interface CircularDependencyOptions { /** * Default is false */ disable?: boolean; /** * exclude detection of files based on a RegExp */ exclude?: RegExp; } export interface BundleOptions { /** * Generate an extra chunk, which contains common modules shared between entry points. * Usage: commonsChunk:{...} */ commonsChunk?: { /** * The chunk name of the commons chunk. If set to manifest id, will append content to that manifest. */ name: GuidValue; /** * The minimum number of chunks which need to contain a module before it's moved into the commons chunk. Default value is 2. */ minChunks?: number; }; /** * Enable it when want to remove # sourceMappingURL. Default is false. */ removeSourceMap?: boolean; } export interface ModuleOptions { /** * Generate an extra chunk, which contains common modules shared between entry points. * Usage: commonsChunk:{...} */ omitPath?: { /** * The value that will be replaced by the new value */ searchValue: string; /** * The value to replace the search value with. Default value is empty */ replaceValue?: string; }; /** * enable to use the path in coomment into a file like //! <omnia-transform-resource path="b483ca53-efb8-4d9f-98d4-1e48b74cd324" /> instead of file path structure . */ enableTransformResourcePath?: boolean; }