mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add missing options
This commit is contained in:
parent
0e29f171fa
commit
765bff2e6a
@ -8,15 +8,21 @@ const config: webpack.Configuration = {
|
||||
filename: 'assets.json'
|
||||
}),
|
||||
new AssetsPlugin({
|
||||
entrypoints: true,
|
||||
filename: 'assets.json',
|
||||
fullPath: false,
|
||||
fileTypes: ['css'],
|
||||
includeManifest: true,
|
||||
includeAllFileTypes: false,
|
||||
keepInMemory: true,
|
||||
manifestFirst: true,
|
||||
path: '/foo/bar',
|
||||
prettyPrint: true,
|
||||
processOutput: (assets) => (
|
||||
'window.assets = ' + JSON.stringify(assets)
|
||||
),
|
||||
update: true,
|
||||
useCompilerPath: true,
|
||||
metadata: {
|
||||
meta: 'data'
|
||||
},
|
||||
|
||||
39
types/assets-webpack-plugin/index.d.ts
vendored
39
types/assets-webpack-plugin/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for assets-webpack-plugin 3.5
|
||||
// Type definitions for assets-webpack-plugin 3.9
|
||||
// Project: https://github.com/ztoben/assets-webpack-plugin
|
||||
// Definitions by: Michael Strobel <https://github.com/kryops>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -16,18 +16,36 @@ declare namespace AssetsWebpackPlugin {
|
||||
type ProcessOutputFn = (assets: Assets) => string;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* If the "entrypoints" option is given, the output will be limited to the entrypoints and the chunks associated with them.
|
||||
* false by default
|
||||
*/
|
||||
entrypoints?: boolean;
|
||||
|
||||
/**
|
||||
* Name for the created json file.
|
||||
* "webpack-assets.json" by default
|
||||
*/
|
||||
filename?: string;
|
||||
|
||||
/**
|
||||
* When set and "includeAllFileTypes" is set false, only assets matching these types will be included in the assets file.
|
||||
* ['js', 'css'] by default
|
||||
*/
|
||||
fileTypes?: string[];
|
||||
|
||||
/**
|
||||
* If false the output will not include the full path of the generated file.
|
||||
* true by default
|
||||
*/
|
||||
fullPath?: boolean;
|
||||
|
||||
/**
|
||||
* When set false, falls back to the "fileTypes" option array to decide which file types to include in the assets file.
|
||||
* true by default
|
||||
*/
|
||||
includeAllFileTypes?: boolean;
|
||||
|
||||
/**
|
||||
* Inserts the manifest javascript as a text property in your assets.
|
||||
* Accepts the name of your manifest chunk.
|
||||
@ -38,6 +56,19 @@ declare namespace AssetsWebpackPlugin {
|
||||
*/
|
||||
includeManifest?: boolean;
|
||||
|
||||
/**
|
||||
* When set the assets file will only be generated in memory while running webpack-dev-server and not written to disk.
|
||||
* false by default
|
||||
*/
|
||||
keepInMemory?: boolean;
|
||||
|
||||
/**
|
||||
* Orders the assets output so that manifest is the first entry.
|
||||
* This is useful for cases where script tags are generated from the assets json output, and order of import is important.
|
||||
* false by default
|
||||
*/
|
||||
manifestFirst?: boolean;
|
||||
|
||||
/**
|
||||
* Inject metadata into the output file. All values will be injected into the key "metadata"
|
||||
*/
|
||||
@ -66,6 +97,12 @@ declare namespace AssetsWebpackPlugin {
|
||||
* false by default
|
||||
*/
|
||||
update?: boolean;
|
||||
|
||||
/**
|
||||
* Will override the path to use the compiler output path set in your webpack config.
|
||||
* false by default
|
||||
*/
|
||||
useCompilerPath?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user