-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix: fix PostCSS warning on build
command
#1664
Conversation
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
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 cla@fb.com. Thanks! |
@@ -53,6 +53,7 @@ function minifyCss(cssContent) { | |||
.process(cssContent, { | |||
preset: 'default', | |||
zindex: false, | |||
from: undefined, |
There was a problem hiding this comment.
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
:
docusaurus/packages/docusaurus-1.x/lib/server/utils.js
Lines 61 to 65 in a718dcd
function autoPrefixCss(cssContent) { | |
return postcss([autoprefixer]) | |
.process(cssContent, { | |
from: undefined, | |
}) |
Deploy preview for docusaurus-2 ready! Built with commit a718dcd |
Deploy preview for docusaurus-preview ready! Built with commit a718dcd |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Motivation
The warning is produced on
cssnano
call. See below: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:
Also, you can reproduce on your shell terminal. Run the following commands:
Related PRs
None.