-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Throw upgrade error when babel version is less than 6.14.0 #116
Conversation
boopathi
commented
Aug 27, 2016
•
edited
Loading
edited
- (Close Set hard dependency on babel.version #70)
- related Minimum browser support is unclear #114
- (Close Webpack Issues #106)
@@ -1,20 +1,53 @@ | |||
const err = new Error("Babili is supported only for babel version >=6.14.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can be more specific here - babel is babel-core
. Can explain you need to update babel-core, or cli, etc
|
||
function isVersion(versionStr) { | ||
const version = versionStr.split(".").map((p) => parseInt(p)); | ||
if (version[0] >= 6 && version[1] >= 14) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return version[0] >= 6 && version[1] >= 14
? :)
thanks! |
|
||
function isVersion(versionStr) { | ||
const version = versionStr.split(".").map((p) => parseInt(p)); | ||
return version[0] >= 6 && version[1] >= 14; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do === 6
instead of >= 6
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is reverted. because it seems not possible to check version in preset.
But yeah, cool.. it should be ===6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh weird. I'd have expected the version to show up properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does show up properly. But problems in supporting older versions.
- Older versions of babel only accept an object
- Newer versions when they accept an object with
key = plugins
don't executebuildPreset
- so no plugin is applied in preset. - We use
name
property to measure performance of each plugin.