UNPKG

atlassian-webresource-webpack-plugin

Version:

Auto-generates web-resource definitions from your webpacked code, for usage in an Atlassian product or plugin.

21 lines (20 loc) 1.12 kB
import ExternalModule from 'webpack/lib/ExternalModule'; import type { ProvidedDependency } from '../types/types'; /** * ProvidedExternalModule ensures that the `chunkCondition` is true to allow proper asyncChunk context handling * ExternalModules can be defined in different ways. Some of them require the external module to be loaded in the entry point. * This is generally not bad as it doesnt cost anything. However the WRM Plugin relies on ExternalModules to specify provided dependencies. * These provided dependencies are then added to the context of the chunk in which they occur. Async chunks should therefore * have their own dependencies to make the entrypoint as small as possible. * ProvidedExternalModule ensures that. */ export default class ProvidedExternalDependencyModule extends ExternalModule { private _wrmDependency; private _request; private _target; constructor(request: ProvidedDependency['import'], dependency: string, target: 'var' | 'amd'); libIdent(): string; chunkCondition(): boolean; getDependency(): string; getConcatenationBailoutReason(): string; }