mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
- definition file - tests https://github.com/webpack-contrib/css-minimizer-webpack-plugin/tree/master/src Thanks!
49 lines
1.5 KiB
TypeScript
49 lines
1.5 KiB
TypeScript
import CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
|
|
module.exports = {
|
|
optimization: {
|
|
minimize: true,
|
|
minimizer: [
|
|
new CssMinimizerPlugin(),
|
|
new CssMinimizerPlugin({}),
|
|
new CssMinimizerPlugin({
|
|
test: /\.foo\.css$/i,
|
|
include: /\/includes/,
|
|
exclude: /\/excludes/,
|
|
cache: true,
|
|
cacheKeys: (defaultCacheKeys, file) => {
|
|
defaultCacheKeys.myCacheKey = 'myCacheKeyValue';
|
|
return defaultCacheKeys;
|
|
},
|
|
minimizerOptions: {
|
|
preset: [
|
|
'default',
|
|
{
|
|
discardComments: { removeAll: true },
|
|
},
|
|
],
|
|
},
|
|
parallel: true,
|
|
sourceMap: {
|
|
inline: false,
|
|
},
|
|
warningsFilter: (warning, file, source) => {
|
|
if (/Dropping unreachable code/i.test(warning)) {
|
|
return true;
|
|
}
|
|
|
|
if (/file\.css/i.test(file)) {
|
|
return true;
|
|
}
|
|
|
|
if (/source\.css/i.test(source)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
}),
|
|
],
|
|
},
|
|
};
|