prepack/.babelrc
Dominic Gannaway 8a61c0c929 Update webpack and change Babel settings
Summary:
Release notes: Prepack now ships Node 6.1+ compatible source

This PR does four things:

- updates webpack to v4
- changes our Babel presets so we now transpile far less code, in fact we now target node 6.1+ min (as we already specified in package.json). The bundle created for the REPL still targets ES5.
- updated eslint
- updated circleci node version to 9.7.1 (yarn says it doesn't support it, but there appears to be no issues)

This should improve runtime performance and make debugging easier. In fact, there's no real need for sourcemaps now, as the code looks almost identical minus module references.

Performance comparisons:

Before:
<img width="550" alt="screen shot 2018-03-04 at 8 34 10 pm" src="https://user-images.githubusercontent.com/1519870/36957766-9ddb8da4-1feb-11e8-89df-c5e6236fa502.png">
After:
<img width="550" alt="screen shot 2018-03-04 at 8 34 22 pm" src="https://user-images.githubusercontent.com/1519870/36957768-a0801cd2-1feb-11e8-8f4e-727ce7f38fb9.png">

Before:
<img width="554" alt="screen shot 2018-03-04 at 8 35 07 pm" src="https://user-images.githubusercontent.com/1519870/36957769-a21ded94-1feb-11e8-8362-b4faba66bc48.png">
After:
<img width="550" alt="screen shot 2018-03-04 at 8 35 13 pm" src="https://user-images.githubusercontent.com/1519870/36957771-a3e2f1ba-1feb-11e8-92dd-134c613f0282.png">

Before:
<img width="691" alt="screen shot 2018-03-04 at 8 43 23 pm" src="https://user-images.githubusercontent.com/1519870/36957902-bd66a266-1fec-11e8-84ee-0d1466c64e32.png">
After:
<img width="681" alt="screen shot 2018-03-04 at 8 43 16 pm" src="https://user-images.githubusercontent.com/1519870/36957904-c11aa75e-1fec-11e8-8036-c7ad17f5dafd.png">
Closes https://github.com/facebook/prepack/pull/1532

Reviewed By: sophiebits

Differential Revision: D7156411

Pulled By: trueadm

fbshipit-source-id: 94f5411e4e849d0577555788ddcd7982912f3176
2018-03-05 20:54:26 -08:00

18 lines
298 B
Plaintext

{
"presets": [
["env", {
"targets": {
"node": "6.10"
}
}]
],
"plugins": [
"syntax-jsx",
"transform-flow-strip-types",
"transform-react-jsx",
"transform-react-display-name",
"transform-class-properties",
"transform-object-rest-spread"
]
}