Skip to content
New issue

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

Support Node's require('file.json') #167

Closed
glenjamin opened this issue Dec 3, 2014 · 3 comments
Closed

Support Node's require('file.json') #167

glenjamin opened this issue Dec 3, 2014 · 3 comments

Comments

@glenjamin
Copy link

This seems somewhat related to #73 - i use a config.json which is loaded with require to setup default configuration for the application.

StartApp(require('./config.json'));

This results in a "module not found" error, which can't be fixed via a declaration until it's possible to declare the default export - ideally require-JSON support would give me the complete object as a "type".

@tcoopman
Copy link
Contributor

I believe this is a duplicate of #51?

@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@jeffmo
Copy link
Contributor

jeffmo commented Feb 23, 2016

As of Flow v0.20, Flow can now understand what it means to require() or import JSON files.

@jeffmo jeffmo closed this as completed Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants