UNPKG

@stencil/core

Version:

A Compiler for Web Components and Progressive Web Apps

27 lines (26 loc) 1.32 kB
import type { BuildConditionals } from '@stencil/core/internal'; /** * A collection of default build flags for a Stencil project. * * This collection can be found throughout the Stencil codebase, often imported from the `@app-data` module like so: * ```ts * import { BUILD } from '@app-data'; * ``` * and is used to determine if a portion of the output of a Stencil _project_'s compilation step can be eliminated. * * e.g. When `BUILD.allRenderFn` evaluates to `false`, the compiler will eliminate conditional statements like: * ```ts * if (BUILD.allRenderFn) { * // some code that will be eliminated if BUILD.allRenderFn is false * } * ``` * * `@app-data`, the module that `BUILD` is imported from, is an alias for the `@stencil/core/internal/app-data`, and is * partially referenced by {@link STENCIL_APP_DATA_ID}. The `src/compiler/bundle/app-data-plugin.ts` references * `STENCIL_APP_DATA_ID` uses it to replace these defaults with {@link BuildConditionals} that are derived from a * Stencil project's contents (i.e. metadata from the components). This replacement happens at a Stencil project's * compile time. Such code can be found at `src/compiler/app-core/app-data.ts`. */ export declare const BUILD: BuildConditionals; export declare const Env: {}; export declare const NAMESPACE: string;