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
I have tried to import the json file in my react application(App.tsx)
[App.tsx
import * as currencies from './currencies.json';](url)
My Json file will look like below structure:
{ "main": { "numbers": { "currencies": { } } } } While running the application, it throws the below error
(1,1): unused expression, expected an assignment or function call
After further analysis, i have added the typings.d.ts file within src folder
declare module "*.json" { const value: any; export default value; }
Please suggest your solution to resolve this issue
The text was updated successfully, but these errors were encountered:
Is any update on this issue?
Sorry, something went wrong.
Did you mean to post this in https://github.com/facebook/create-react-app/issues? Doesn't look like anything to do with React.
No branches or pull requests
I have tried to import the json file in my react application(App.tsx)
[App.tsx
import * as currencies from './currencies.json';](url)
My Json file will look like below structure:
{
"main": {
"numbers": {
"currencies": {
}
}
}
}
While running the application, it throws the below error
(1,1): unused expression, expected an assignment or function call
After further analysis, i have added the typings.d.ts file within src folder
declare module "*.json" {
const value: any;
export default value;
}
Please suggest your solution to resolve this issue
The text was updated successfully, but these errors were encountered: