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

React 17 support #52

Closed
mrtnbroder opened this issue Nov 30, 2020 · 2 comments · Fixed by #53
Closed

React 17 support #52

mrtnbroder opened this issue Nov 30, 2020 · 2 comments · Fixed by #53

Comments

@mrtnbroder
Copy link

mrtnbroder commented Nov 30, 2020

this.imports.add(`import React from 'react';`);

It would be great if this line could be configured via an option defaultLibImport (or maybe you can come up with a better name) where we can configure this line. Some projects may want to use Preact or in my case, I don't want any React import at all. (or at least change it to import * as React from "react" or since Im using typescript and the only reason react is imported is for types - import type * as React from "react"

See the reason for this here on the offical repo: facebook/react#18102

@mrtnbroder mrtnbroder changed the title No default import with React 17 React 17 support Nov 30, 2020
@correttojs
Copy link
Owner

hi, thank you for the feedback
Added the reactImport config, the default value is import type React from 'react'

@mrtnbroder
Copy link
Author

Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants