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
This commit is contained in:
Masafumi Koba 2019-07-15 19:08:06 +09:00 committed by Endi
parent bc5bceeb87
commit d77f5538c2

View file

@ -53,6 +53,7 @@ function minifyCss(cssContent) {
.process(cssContent, {
preset: 'default',
zindex: false,
from: undefined,
})
.then(result => result.css);
}