From d77f5538c2fa1d86ea0dd5872bff08eea8be8c00 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Mon, 15 Jul 2019 19:08:06 +0900 Subject: [PATCH] fix: fix PostCSS warning on `build` command (#1664) The warning is produced on `cssnano` call. See below: > Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning. Reproduction: ```shell mkdir work cd work npx docusaurus-init cd website yarn install yarn run build ``` Environments: - Node: 12.6.0 - Yarn: 1.17.3 --- packages/docusaurus-1.x/lib/server/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus-1.x/lib/server/utils.js b/packages/docusaurus-1.x/lib/server/utils.js index 905ffb883707..54c409248303 100644 --- a/packages/docusaurus-1.x/lib/server/utils.js +++ b/packages/docusaurus-1.x/lib/server/utils.js @@ -53,6 +53,7 @@ function minifyCss(cssContent) { .process(cssContent, { preset: 'default', zindex: false, + from: undefined, }) .then(result => result.css); }