We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yo, tried to submit a pr but I have no permissions so leaving this here since it's what worked for me:
replace client.d.ts with the followng:
// https://github.com/facebook/create-react-app/blob/0ee4765c39f820e5f4820abf4bf2e47b3324da7f/packages/react-scripts/lib/react-app.d.ts#L47-L56 declare module '*.svg' { import * as React from 'react' export const ReactComponent: React.FunctionComponent< React.SVGProps<SVGSVGElement> & { title?: string } > export default ReactComponent }
not sure if there is a way to make this conditional based on the exportDefault config option I'm afraid, that would be nicer..
exportDefault
maybe include both? my typescript doesn't seem to mind:
declare module '*.svg' { import * as React from 'react' export const ReactComponent: React.FunctionComponent< React.SVGProps<SVGSVGElement> & { title?: string } > export default ReactComponent } declare module '*.svg' { import * as React from 'react' export const ReactComponent: React.FunctionComponent< React.SVGProps<SVGSVGElement> & { title?: string } > const src: string; export default src; }
I understand now why the other plugins have the ?component and ?url options
?component
?url
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Yo, tried to submit a pr but I have no permissions so leaving this here since it's what worked for me:
replace client.d.ts with the followng:
not sure if there is a way to make this conditional based on the
exportDefault
config option I'm afraid, that would be nicer..maybe include both? my typescript doesn't seem to mind:
I understand now why the other plugins have the
?component
and?url
optionsThe text was updated successfully, but these errors were encountered: