You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b999d26
Browse filesBrowse the repository at this point in the historyBrowse files
/** @import { Schema, ValidationErrorConfiguration } from "schema-utils" */
91
-
/** @import { PrecompiledCheck } from "./util/validateSchema" */
91
+
/** @import { PrecompiledCheck, ValidatedValue} from "./util/validateSchema" */
92
92
93
93
/**
94
94
* Defines the compilation params type used by this module.
@@ -1717,7 +1717,7 @@ ${other}`);
1717
1717
1718
1718
/**
1719
1719
* Validates a value against a schema, skipping the schema when the precompiled check passes
1720
-
* @template {object | object[]} T
1720
+
* @template {ValidatedValue} T
1721
1721
* @param {Schema | (() => Schema)} schema schema, or a function returning it so a valid value never reads it
1722
1722
* @param {T} value value
1723
1723
* @param {(ValidationErrorConfiguration | PrecompiledCheck<T>)=} options name and data path of the errors, read from a schema titled `"<name> <baseDataPath>"` when not given; the check can take its place
* worker pool as source (a top-level import wouldn't survive), and `require("webpack")`
36
37
* re-resolves in the worker — via the installed package, or the dev self-link.
37
38
* @param {{ [file: string]: string | Buffer }} input a single `{ filename: code }` entry; a `Buffer` is read as UTF-8
38
-
* @param {object=} sourceMap the asset's input source map — the plugin chains it onto the map returned here, so it isn't read directly
39
+
* @param {Partial<RawSourceMap>=} sourceMap the asset's input source map — the plugin chains it onto the map returned here, so it isn't read directly
39
40
* @param {{ as?: "stylesheet" | "block-contents", environment?: CssEnvironment, charset?: "auto" | false, convertLengthUnits?: boolean, convertApproximateColors?: boolean, dropOverriddenDeclarations?: boolean, extractComments?: MinimizeExtractComments, mergeDistantRules?: boolean, rewriteCustomProperties?: boolean, unusedSymbols?: string[], pseudoClasses?: { [name: string]: string }, renderEmbeddedSource?: AsyncEmbeddedSourceRenderer, svg?: boolean } & CssTransformOptions=} minimizerOptions minimizer options — `environment` carries the target's CSS abilities (see `output.environment`), so a spelling the target cannot read is not reached for; the rest is `optimization.minimize.css` (e.g. `convertLengthUnits`, and the per-transform switches). `renderEmbeddedSource` minifies source this stylesheet embeds, and may be asynchronous: one parse serves both it and the output; `svg` minifies an SVG `data:` URL it declines as the `.svg` assets are. Its `extractComments` decides which comments move into a separate file, over the plugin's
40
41
* @param {ExtractCommentsOption=} extractComments the plugin's `extractComments`, read where `minimize.css.extractComments` is not set
41
42
* @returns {Promise<{ code: string, map?: SourceMap, extractedComments?: string[], warnings?: (Error | string)[], errors?: (Error | string)[] }>} the minified CSS, its input->output source map (one anchor for the whole of a `block-contents` print, which is emitted as one piece), the comments taken out of it, and what a renderer reported over what this embeds
* `minimizer-webpack-plugin` ships this function to its worker pool as source,
31
32
* where this module's own scope is gone.
32
33
* @param {{ [file: string]: string | Buffer }} input a single `{ filename: code }` entry; a `Buffer` is read as UTF-8
33
-
* @param {object=} sourceMap the asset's input source map — the plugin chains it onto the map returned here, so it isn't read directly
34
+
* @param {Partial<RawSourceMap>=} sourceMap the asset's input source map — the plugin chains it onto the map returned here, so it isn't read directly
34
35
* @param {(MinifyOptions & { as?: JavascriptSourceType })=} minimizerOptions `optimization.minimize.javascript`; `as` names the production the source is written in, which is the source's own rather than the configuration's
35
36
* @param {ExtractCommentsOption=} extractComments which comments to move into a separate file
36
37
* @returns {Promise<{ code: string, map?: SourceMap, extractedComments?: string[] }>} the minified code, its input->output source map, and the comments taken out of it
0 commit comments