Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix PostCSS warning on build command #1664

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

ybiquitous
Copy link
Contributor

Motivation

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.

I think the warning makes users confusing.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

The warning is produced already. See the build log:

image

Also, you can reproduce on your shell terminal. Run the following commands:

mkdir work
cd work
npx docusaurus-init
cd website
yarn install
yarn run build

image

Related PRs

None.

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
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@@ -53,6 +53,7 @@ function minifyCss(cssContent) {
.process(cssContent, {
preset: 'default',
zindex: false,
from: undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: from: undefined is also set on autoprefixer:

function autoPrefixCss(cssContent) {
return postcss([autoprefixer])
.process(cssContent, {
from: undefined,
})

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit a718dcd

https://deploy-preview-1664--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit a718dcd

https://deploy-preview-1664--docusaurus-preview.netlify.com

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 15, 2019
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@endiliey endiliey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants