Open hongkongk opened 4 years ago
Could you please create repo with minimal setup to demonstrate a problem (package.json, webpack config, SVG image and piece of your code). If you don't want to create a repository - you can create a gist with multiple files.
Thanks, I have fixed it.
Overwriting our global typing in TypeScript to make svg imports work with react-inline-svg.
Workaround is to use path mapping to redirect next-images typing to a custom file.
tsconfig.json
{
"compilerOptions": {
...
"paths: {
"next-images": ["./local_types/whatever.d.ts"]
}
}
}
./local_types/whatever.d.ts
// type for react-inline-svg
declare module '*.svg' {
const content: any;
export default content;
}
// copy rest of types
...
environment: