How to use async function?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript
- Bereich
- tooling
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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?
- Vorherrschende Sprache
- JavaScript
- Sterne
- 661
- Forks
- 76
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus postcss/postcss-load-config
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
postcss/postcss-load-config#266 · 3 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
postcss/postcss-load-config#248 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
postcss/postcss-load-config#225 · 13 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
postcss/postcss-load-config#221 · 4 Kommentare ·
-
priority: medium semver: minor type: feature
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
postcss/postcss-load-config#183 · 1 Kommentar · 4 Reaktionen ·
Alle Issues in postcss/postcss-load-config
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Forrest-Technologies/drover#1040 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue help wanted
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
erkamyaman/rust-anything#702 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
-
good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
erkamyaman/unslop-anything#231 ·
Maintainer antworten meist innerhalb von 1 Tag