mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #46664 update(terser-webpack-plugin): update to v4.1 by @peterblazejewicz
- limit types of props returned with result, this is actually 4.0 public API change: https://github.com/webpack-contrib/terser-webpack-plugin/compare/v3.1.0...v4.0.0 - tests updated - minor version bump Thanks!
This commit is contained in:
parent
9d055f00a1
commit
db841e9f31
4
types/terser-webpack-plugin/index.d.ts
vendored
4
types/terser-webpack-plugin/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for terser-webpack-plugin 4.0
|
||||
// Type definitions for terser-webpack-plugin 4.1
|
||||
// Project: https://github.com/webpack-contrib/terser-webpack-plugin
|
||||
// Definitions by: Daniel Schopf <https://github.com/Danscho>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
@ -13,10 +13,8 @@ import { MinifyOptions } from 'terser';
|
||||
*/
|
||||
declare namespace TerserPlugin {
|
||||
interface MinifyResult {
|
||||
error: any;
|
||||
map: any;
|
||||
code: any;
|
||||
warnings: any;
|
||||
extractedComments: any;
|
||||
}
|
||||
|
||||
|
||||
@ -50,10 +50,8 @@ const _ = webpack({
|
||||
minify: (file, sourceMap) => {
|
||||
const results: TerserPlugin.MinifyResult = {
|
||||
code: '',
|
||||
error: '',
|
||||
extractedComments: [''],
|
||||
map: '',
|
||||
warnings: [''],
|
||||
};
|
||||
return results;
|
||||
},
|
||||
@ -129,6 +127,22 @@ const _ = webpack({
|
||||
},
|
||||
extractComments: false,
|
||||
}),
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
ecma: undefined,
|
||||
parse: {},
|
||||
compress: {},
|
||||
mangle: true, // Note `mangle.properties` is `false` by default.
|
||||
module: false,
|
||||
output: undefined,
|
||||
toplevel: false,
|
||||
nameCache: undefined,
|
||||
ie8: false,
|
||||
keep_classnames: undefined,
|
||||
keep_fnames: false,
|
||||
safari10: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user