How to use async function?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start by reproducing the async processPostCSS example and capture the error from postcssrc(ctx), since no file or test is identified in the issue. Done means determining why the async API fails and documenting or fixing the behavior so the example returns css successfully.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I've never been able to successfully use the async API in my application and I'm wondering why? Do you have any thoughts?
I'm using:
async function processPostCSS(src = '') {
const ctx = { parser: true, map: 'inline' };
const { plugins } = await postcssrc(ctx)
const { css } = await postcss([postcssNested(), autoprefixer(), ...plugins]).process(src, { from: undefined })
return css
}
postcssrc(ctx) causes this function to break for some reason that I don't understand. If I change to the synchronous API it works fine. I'm not sure how to tell what the error is, all I know is that it doesn't return the css when I use the postcss-load-config async API
What am I doing incorrectly?
- Ngôn ngữ chính
- JavaScript
- Star
- 661
- Fork
- 76
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của postcss/postcss-load-config
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
postcss/postcss-load-config#266 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
postcss/postcss-load-config#248 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
postcss/postcss-load-config#225 · 13 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
postcss/postcss-load-config#221 · 4 bình luận ·
-
Load config from NPM packageĐang mởpriority: medium semver: minor type: feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
postcss/postcss-load-config#183 · 1 bình luận · 4 reaction ·
Tất cả issue của postcss/postcss-load-config
Issue tương tự
-
fix: the live capture mode of check-native-browser.mjs ignores PLAYWRIGHT_CHROMIUM_EXECUTABLEĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Forrest-Technologies/drover#1040 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
erkamyaman/rust-anything#702 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
erkamyaman/unslop-anything#231 ·
Maintainer thường phản hồi trong vòng 1 ngày