mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 03:08:17 +02:00
* feat(v2): optimize CSS bundle * Move to separate preset * Move custom scrollbar styles to separate class * Cleanup styles * Remove unactual styles * Various CSS optimizations, cleanup styles for NProgress * Add ability to back to old way of minifying CSS * chore(v2): downgrade babel-plugin-dynamic-import-node to 2.3.0 * Use env var for back to simple CSS minifier * remove unnecessary typing [skip-ci] * Remove missing dep * Update website/docs/cli.md Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
21 lines
785 B
JavaScript
21 lines
785 B
JavaScript
/**
|
|
* 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.
|
|
*/
|
|
|
|
const advancedBasePreset = require('cssnano-preset-advanced');
|
|
const postCssCombineDuplicatedSelectors = require('postcss-combine-duplicated-selectors');
|
|
const postCssSortMediaQueries = require('postcss-sort-media-queries');
|
|
const postCssRemoveOverriddenCustomProperties = require('./src/remove-overridden-custom-properties');
|
|
|
|
const preset = advancedBasePreset({autoprefixer: {add: true}});
|
|
|
|
preset.plugins.unshift(
|
|
[postCssCombineDuplicatedSelectors, {removeDuplicatedProperties: true}],
|
|
[postCssSortMediaQueries],
|
|
[postCssRemoveOverriddenCustomProperties],
|
|
);
|
|
|
|
module.exports = preset;
|