Typescript paths alias doesn't resolve

Offen
#266 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet

Rechercherichtung

Start with the module-resolution path used for postcss.config.ts and compare it with the tsconfig.json path alias in the reported Nx monorepo. Reproduce the relative-import and aliased-import cases, then use the existing configuration-loading tests or add a focused regression test showing that the alias resolves successfully.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Trying to use a shared tailwind config in an integrated Nx monorepo. The module resolution is all done with typescript path aliasing rather than package manager workspace module resolution. The shared tailwind config works just fine if I do a relative import ../../libs/shared-tailwind-config.ts but fails with a module failed to resolve if I have a path alias in my tsconfig of @tw: [/libs/shared-tailwind-config.ts]. I have included the postcss.config.ts file in my tsconfig.josn and VS code is able to recognize the import alias correctly in the file.

Vorherrschende Sprache
JavaScript
Sterne
661
Forks
76
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus postcss/postcss-load-config

Alle Issues in postcss/postcss-load-config

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.