-
I am getting a ts error that says:
The image is bundled correctly, but I keep getting this ts error. I have the following tsconfig.json: {
"compilerOptions": {
"jsx": "react",
"esModuleInterop": true
},
} Since Parcel bundles without issues, I am assuming this is related to some missing TypeScript configuration. Do you confirm this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Maybe adding something like this to your project makes TS happy? declare module 'url:*' {
export default string;
} |
Beta Was this translation helpful? Give feedback.
-
Hey @mischnic I'd like to build onto this answer, because now I am trying to add type-checking to a project and have followed your instructions but TS keeps complaining about not finding the module 'url:../assets/parcel.png' or its type declaration. NOTE: I have the EDIT: After having added |
Beta Was this translation helpful? Give feedback.
-
The docs now says to use declare module 'url:*' {
const value: string;
export default value;
} |
Beta Was this translation helpful? Give feedback.
Maybe adding something like this to your project makes TS happy?