Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

fix: Container.create doesn't work with Babel v7.10 #495

Merged
merged 3 commits into from
Dec 14, 2020

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented Jul 31, 2020

As #486 #489 mentioned, Container.create does not work with Babel v7.10.
To fix this, I've updated the version of Babel to the latest version.
I've also updated fbjs and used babel-preset-fbjs instead of fbjs-scripts because I have to use stripDev option.

I'm not familiar with fbjs and a module system that facebook uses, so please correct me if I misunderstand.

This version still seems not to work with a project based on cra, so I'll investigate it.

"cannot be invoked without 'new'"

I've published this version as a forked package @koba04/flux, so you can test the build with the package.

@kyldvs
Copy link
Contributor

kyldvs commented Jul 31, 2020

Thanks for working on this! @yangshun or I can help with a release when this is ready to go

@rvignacio
Copy link

I tested this PR in the context of my previously failing project and it works with latest Babel version (#489).

@koba04
Copy link
Contributor Author

koba04 commented Sep 23, 2020

@rvignacio Thank you for testing this!

@Bloomca
Copy link

Bloomca commented Sep 26, 2020

@koba04 I tested your package (@koba04/flux) in our project and it also works with the latest Babel version.

@koba04
Copy link
Contributor Author

koba04 commented Sep 26, 2020

@Bloomca Thank you for testing this!
This seems to work fine with the latest version of Babel.

@koba04 koba04 changed the title [WIP] fix: Container.create doesn't work with Babel v7.10 fix: Container.create doesn't work with Babel v7.10 Sep 29, 2020
@koba04
Copy link
Contributor Author

koba04 commented Sep 29, 2020

@kyldvs Could you review this?

@rvignacio rvignacio mentioned this pull request Oct 28, 2020
@yangshun yangshun merged commit c9fc71e into facebookarchive:master Dec 14, 2020
@yangshun
Copy link
Contributor

Thanks a lot @koba04! I'll merge first and resolve some of the conflicts. We aim to release a v4.0.0 this week.

@koba04 koba04 deleted the babel7 branch December 14, 2020 15:57
@koba04
Copy link
Contributor Author

koba04 commented Dec 14, 2020

@yangshun Thank you for merging this! Please let me know If there is any problem. I'll work on this.

@yangshun
Copy link
Contributor

@koba04 We've released v4.0.0! Would appreciate if you could help to test it 😄

@fastman
Copy link

fastman commented Feb 14, 2022

I can confirm that it works with @babel/preset-react@7.16.7

Package Type Update Change
@babel/core (source) devDependencies minor 7.8.7 -> 7.17.2
@babel/plugin-transform-classes (source) devDependencies minor 7.8.6 -> 7.16.7
@babel/preset-env (source) devDependencies minor 7.8.7 -> 7.16.11
@babel/preset-react (source) devDependencies minor 7.8.3 -> 7.16.7
babel-loader devDependencies minor 8.0.6 -> 8.2.3

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

Successfully merging this pull request may close these issues.

7 participants