Interface WebDependency

Interface describing runtime dependencies of a Module. A Module may specify an array of UMD bundles to be loaded by the Kernel through the unpkg property. A Module may also specify a mapping of import specifiers to Module-relative paths through the exports property. Every specified WebDependency is loaded before respective bundles of the Module, which depends on the specified WebDependency, will be loaded themselves.

Example

An exemplary webDependency definition:

import { type Kernel } from '@sgrud/core';

const webDependency: Kernel.WebDependency = {
exports: {
webDependency: './webDependency.exports.js'
},
unpkg: [
'./webDependency.unpkg.js'
]
};
interface WebDependency {
    exports?: Record<string, string>;
    unpkg?: string[];
}

Properties

Properties

exports?: Record<string, string>

Optional ESM runtime dependencies.

unpkg?: string[]

Optional UMD runtime dependencies.

Generated using TypeDoc