@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
18 lines (17 loc) • 1.14 kB
TypeScript
/**
* The import.meta.env.DEV checks are used to include certain code only in development builds.
* Vite (and other modern bundlers) statically replace import.meta.env.DEV with true (development) or false (production).
* This allows bundlers to remove development-only code (such as localWorker functions) from production bundles via tree-shaking,
* resulting in smaller and more efficient production builds.
*
* See: https://vitejs.dev/guide/env-and-mode.html#env-variables
*
* Note: Even if code using these imports is removed by tree-shaking, Vite still processes and builds all statically imported modules
* because the module dependency graph is constructed at build time before tree-shaking occurs. This means worker files and other
* statically imported assets are built and emitted, even if they are not ultimately referenced in the final bundle.
*
*/
export declare function isMonacoEnvironmentSetup(): boolean;
export declare function getAssetsPath(): string | undefined;
export declare const additionalLanguageWorkersMap: Map<string, string>;
export declare function setupMonacoEnvironment(assetsPath: string): void;