diff --git a/ivette/src/dome/renderer/dome.tsx b/ivette/src/dome/renderer/dome.tsx index ef88eecd1347b1869aae951c17836273ca826b30..024312ea19fe57a61d2f2406bca112eeed664ceb 100644 --- a/ivette/src/dome/renderer/dome.tsx +++ b/ivette/src/dome/renderer/dome.tsx @@ -119,6 +119,16 @@ export function getWorkingDir(): string { return System.getWorkingDir(); } /** Current process ID.. */ export function getPID(): number { return System.getPID(); } +// The __static path is provided by webpack at execution time, but the static +// type system is not aware of that for now. This is a workaround to avoid +// an error during compilation. +declare const __static: string; + +/** Path to application static resources. */ +export function getStatic(file?: string): string { + return file ? System.join(__static, file) : __static; +} + // -------------------------------------------------------------------------- // --- Application Emitter // --------------------------------------------------------------------------