-
Notifications
You must be signed in to change notification settings - Fork 36
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
Babel MVP #143
Babel MVP #143
Changes from all commits
677cad8
6ab4da3
0023e3c
bd7bc13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"./.babelrc.js" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const modules = process.env.NODE_ENV === 'test' ? 'commonjs' : false | ||
|
||
module.exports = { | ||
presets: [ | ||
['env', { | ||
modules, | ||
loose: true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was thinking about it, but aint sure if there is any benefit in that if we do not provide non-default targets, thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's same target like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Just a confirmation - that's exactly what it is
Good point, gonna add this later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant semantically the same too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Am I understanding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kinda, its job is to output pure es5 which can be ofc understood by subsequent tools (like uglifyjs) Preset2015 has only es2015 plugins in it, but preset-env has also plugins from other yearly presets and also it has (or soon it will, aint sure) shipped proposals plugins (like when browsers implement language features from stage 3 or something). |
||
forceAllTransforms: true | ||
}] | ||
], | ||
plugins: [ | ||
'annotate-pure-calls' | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"./.babelrc.js" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const modules = process.env.NODE_ENV === 'test' ? 'commonjs' : false | ||
|
||
module.exports = { | ||
presets: [ | ||
['env', { | ||
modules, | ||
loose: true, | ||
forceAllTransforms: true | ||
}] | ||
], | ||
plugins: [ | ||
'annotate-pure-calls' | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"./.babelrc.js" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const modules = process.env.NODE_ENV === 'test' ? 'commonjs' : false | ||
|
||
module.exports = { | ||
presets: [ | ||
['env', { | ||
modules, | ||
loose: true, | ||
forceAllTransforms: true | ||
}] | ||
], | ||
plugins: [ | ||
'annotate-pure-calls' | ||
] | ||
} |
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.
in babel7 (soon-ish) it will be possible to use
.babelrc.js
directly and therefore omit those.babelrc
entirely