Skip to content

Commit

Permalink
fix: fix PostCSS warning on build command (#1664)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ybiquitous authored and endiliey committed Jul 15, 2019
1 parent bc5bcee commit d77f553
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/docusaurus-1.x/lib/server/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function minifyCss(cssContent) {
.process(cssContent, {
preset: 'default',
zindex: false,
from: undefined,
})
.then(result => result.css);
}
Expand Down

0 comments on commit d77f553

Please sign in to comment.