mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
27 lines
798 B
TypeScript
27 lines
798 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import advancedBasePreset from 'cssnano-preset-advanced';
|
|
import postCssSortMediaQueries from 'postcss-sort-media-queries';
|
|
import postCssRemoveOverriddenCustomProperties from './remove-overridden-custom-properties';
|
|
|
|
const preset: typeof advancedBasePreset = function preset(opts) {
|
|
const advancedPreset = advancedBasePreset({
|
|
autoprefixer: {add: false},
|
|
discardComments: {removeAll: true},
|
|
...opts,
|
|
});
|
|
|
|
advancedPreset.plugins.unshift(
|
|
[postCssSortMediaQueries, undefined],
|
|
[postCssRemoveOverriddenCustomProperties, undefined],
|
|
);
|
|
|
|
return advancedPreset;
|
|
};
|
|
|
|
export = preset;
|