parcel
parcel copied to clipboard
Parcel Resolver 2.9.1 - Invalid specifier for explicit path aliases in tsconfig
🐛 bug report
🤔 Expected Behavior
After upgrading to parcel 2.9.1
from 2.8.2
, the resolver was not able to parse our tsconfig
anymore. In addition to "wildcard" paths, "explicit" paths should be parsed then resolved as well.
😯 Current Behavior
The following error was raised when building our app:
@parcel/resolver-default: Error parsing JSON
tsconfig.json:39:12
38 | "@tests/*": ["./tests/*"],
> 39 | "@api": ["./src/api/"],
> | ^ Invalid specifier at line 39 column 12
40 | "@api/*": ["./src/api/*"]
41 | },
We can bypass this issue by simply declaring "@api/*": ["./src/api/*"]
and importing the relevant files directly, but for simplicity we would prefer to continue being able to point directly to our index.ts
file with import api from '@api'
to access all our exports at once.
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.9.1 |
Node | v16.15.0 |
npm/Yarn | 3.3.1 |
Operating System | 6.3.5-arch1-1 |