mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-29 05:12:52 +00:00
fix(v2): disables all inlining in CleanCSS (#3943)
This commit is contained in:
parent
2fb766ba7c
commit
83a5240f57
|
|
@ -203,15 +203,15 @@ export function compile(config: Configuration[]): Promise<void> {
|
|||
const compiler = webpack(config);
|
||||
compiler.run((err, stats) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
reject(new Error(err.toString()));
|
||||
}
|
||||
if (stats.hasErrors()) {
|
||||
if (stats?.hasErrors()) {
|
||||
stats.toJson('errors-only').errors.forEach((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
reject(new Error('Failed to compile with errors.'));
|
||||
}
|
||||
if (stats.hasWarnings()) {
|
||||
if (stats?.hasWarnings()) {
|
||||
// Custom filtering warnings (see https://github.com/webpack/webpack/issues/7841).
|
||||
let {warnings} = stats.toJson('errors-warnings');
|
||||
|
||||
|
|
@ -453,6 +453,7 @@ export function getMinimizer(useSimpleCssMinifier = false): Plugin[] {
|
|||
new OptimizeCSSAssetsPlugin({
|
||||
cssProcessor: CleanCss,
|
||||
cssProcessorOptions: {
|
||||
inline: false,
|
||||
level: {
|
||||
1: {
|
||||
all: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue