| | |
| | | const { ConcatSource } = require("webpack-sources"); |
| | | const { UsageState } = require("../ExportsInfo"); |
| | | const RuntimeGlobals = require("../RuntimeGlobals"); |
| | | const propertyAccess = require("../util/propertyAccess"); |
| | | const { propertyAccess } = require("../util/property"); |
| | | const { getEntryRuntime } = require("../util/runtime"); |
| | | const AbstractLibraryPlugin = require("./AbstractLibraryPlugin"); |
| | | |
| | |
| | | /** @typedef {import("../Module")} Module */ |
| | | /** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */ |
| | | /** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */ |
| | | /** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext<T>} LibraryContext<T> */ |
| | | /** |
| | | * Defines the shared type used by this module. |
| | | * @template T |
| | | * @typedef {import("./AbstractLibraryPlugin").LibraryContext<T>} LibraryContext<T> |
| | | */ |
| | | |
| | | /** |
| | | * Defines the export property library plugin parsed type used by this module. |
| | | * @typedef {object} ExportPropertyLibraryPluginParsed |
| | | * @property {LibraryExport=} export |
| | | */ |
| | | |
| | | /** |
| | | * Defines the export property library plugin options type used by this module. |
| | | * @typedef {object} ExportPropertyLibraryPluginOptions |
| | | * @property {LibraryType} type |
| | | */ |
| | | /** |
| | | * Represents the export property library plugin runtime component. |
| | | * @typedef {ExportPropertyLibraryPluginParsed} T |
| | | * @extends {AbstractLibraryPlugin<ExportPropertyLibraryPluginParsed>} |
| | | */ |
| | | class ExportPropertyLibraryPlugin extends AbstractLibraryPlugin { |
| | | /** |
| | | * Creates an instance of ExportPropertyLibraryPlugin. |
| | | * @param {ExportPropertyLibraryPluginOptions} options options |
| | | */ |
| | | constructor({ type }) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns preprocess as needed by overriding. |
| | | * @param {LibraryOptions} library normalized library option |
| | | * @returns {T | false} preprocess as needed by overriding |
| | | * @returns {T} preprocess as needed by overriding |
| | | */ |
| | | parseOptions(library) { |
| | | return { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Finish entry module. |
| | | * @param {Module} module the exporting entry module |
| | | * @param {string} entryName the name of the entrypoint |
| | | * @param {LibraryContext<T>} libraryContext context |
| | |
| | | } |
| | | |
| | | /** |
| | | * Processes the provided chunk. |
| | | * @param {Chunk} chunk the chunk |
| | | * @param {RuntimeRequirements} set runtime requirements |
| | | * @param {LibraryContext<T>} libraryContext context |
| | |
| | | } |
| | | |
| | | /** |
| | | * Renders source with library export. |
| | | * @param {Source} source source |
| | | * @param {Module} module module |
| | | * @param {StartupRenderContext} renderContext render context |