Skip to content

Use Create react app instead of custom webpack. #151

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

Closed
quantuminformation opened this issue Mar 26, 2019 · 11 comments · Fixed by #159
Closed

Use Create react app instead of custom webpack. #151

quantuminformation opened this issue Mar 26, 2019 · 11 comments · Fixed by #159

Comments

@quantuminformation
Copy link

Now that Create react app has typescript support, I would suggest using that, to make this project fit closer to real-world projects. All of my clients use Create react app for typescript.

@piotrwitek
Copy link
Owner

Thanks for suggestion @quantuminformation.
I will try to do that as soon as I can find some free time.

@chawax
Copy link
Contributor

chawax commented Apr 6, 2019

I am trying to move my Typescrit project (one I created from React Boilerplate) to Create React App but the problem is CRA uses Babel Typescript transpiler and it has no support for Typescript namespaces !

babel/babel#8244

It's a big problem when you use Swagger Codegen to generate API clients and you use enums in your Swagger file since enums are defined in namespaces. I had the same problem with a React Native project and had to bypass Babel TS transpiler.

One solution may be to eject React Scripts and replace babel-loader in webpack config file with awesome-typescript-loader for example. But I had not tested it yet.

Obviously the best solution would be to change the way Swagger Codegen works with enums. But it looks a bit complex !

@chawax
Copy link
Contributor

chawax commented Apr 6, 2019

I probably found a better solution : using Open API generators to generate my API client from Swagger, since they don't use namespaces. I am giving it a try ! And moreover the generated code is cleaner.

@quantuminformation
Copy link
Author

I'm willing to fund this issue.

@quantuminformation
Copy link
Author

I think this issue will allow the patterns expressed here to fit in easier to other CRA apps based on my efforts this week.

@quantuminformation
Copy link
Author

quantuminformation commented Apr 8, 2019

My card keeps getting declined by stipe(

The credit card form is pretty bad for that stripe widget.

@IssueHuntBot
Copy link

@IssueHunt has funded $150.00 to this issue.


@piotrwitek
Copy link
Owner

I'll be working on this today

@quantuminformation
Copy link
Author

quantuminformation commented Apr 13, 2019 via email

@IssueHuntBot
Copy link

@piotrwitek has rewarded $105.00 to @piotrwitek. See it on IssueHunt

  • 💰 Total deposit: $150.00
  • 🎉 Repository reward(20%): $30.00
  • 🔧 Service fee(10%): $15.00

@quantuminformation
Copy link
Author

Nice work!

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

Successfully merging a pull request may close this issue.

4 participants