Commit Graph

33 Commits

Author SHA1 Message Date
Dan Abramov
1407287839 Add mode entry points to our preset (#4669) 2018-06-23 14:41:51 +01:00
Rob Grochowicz
1d4fdc2dd4 Enable loose mode for class-properties (#4248)
* Enable loose mode for `class-properties`

* Update comment to point to discussion

Resolves #4263
2018-04-05 20:42:01 -04:00
Brian Ng
cb3f835586 Bump babel-related deps (#4159)
* Add explicit dep on plugin-proposal-object-rest-spread to babel-preset-react-app

* Bump babel-related deps to beta.42

* Pass useBuiltIns directly to react-preset
2018-03-18 14:22:56 -06:00
Michaël De Boey
25184c4e91 Fix links to package (#3898) 2018-01-22 22:16:22 +00:00
Eduardo Rabelo
d67a9e7932 feat: add opt-out for prestet-flow to work with @babel/preset-typescript (#3865)
* feat: add opt-out for prestet-flow to work with @babel/preset-typescript

* docs: adding example in readme
2018-01-19 13:10:03 +00:00
Ian Sutherland
a00cae77df Remove PropTypes from production build (#209) (#3818)
* Remove PropTypes from production build (#209)

* Added react/forbid-foreign-prop-types rule to eslint config

* Removed react/forbid-foreign-prop-types rule from eslint config
2018-01-17 20:28:59 +00:00
Joe Haddad
aa67a4f78e Loosen Babel preset to use browserslist (#3770)
* Provide better defaults

* Let babel determine features to compile

* meh

* Remove setting of BABEL_ENV

* Revert "Remove setting of BABEL_ENV"

This reverts commit ee2db707faa8b9ada3e7a668e8a94944f5955a1e.

* Set browsers to ie9
2018-01-15 00:08:14 -05:00
Clement Hoang
1552949a3b Switch to Babel 7 (#3522)
* Update dependencies in react-scripts

* Add first pass of working dependencies for babel-preset-react-app and react-scripts

* Bump more dependency versions

* Adjust more versions and edit fix options

* Restore functionality of old preset

* Disable Uglify in iframe webpack

* Apply prettier

* Re-enable cache in dev and clean deps

* Lock packages and move babel/core to dep in preset

* Bump babel-jest

* Re-enable uglify

* Nest forceAllTransforms correctly in webpack config

* Install babel-core bridge for jest

* Add jest-cli and babel-core bridge to make tests in react-error-overlay pass

* Re-enable transform-dynamic-import

* Add dynamic import syntax support back

* Use new babel in kitchensink

* Transform modules in test

* Revert "Transform modules in test"

This reverts commit 539e46a1d77259898b7e70d778a5e43fc25edc2a.

* Attempt fix for ejected tests

* try this

* Add regenerator back

* Bump babel deps to beta.34

* Remove bad files

* Use default when requiring babel transform plugin

* Bump deps

* Try the fix?

* Oopsie

* Remove some weird things

* Run Babel on react-error-overlay tests

* Try fixing kitchensink

* Use new API for codeFrame

* Add missing (?) babelrc

* Maybe this helps?

* Maybe fix mocha

* I shouldn't have deleted this 🤦
2018-01-15 00:07:57 -05:00
Kent C. Dodds
3c3547f942 add experimental babel-plugin-macros support (#3675)
* add experimental babel-plugin-macros support

closes #2730

This will remain undocumented until the brave have tried it in the wild.

**Test Plan:**

There's currently no established way to test changes to
`babel-preset-react-app`. But I did create
[`unmaintained-react-scripts-babel-macros`](https://www.npmjs.com/package/unmaintained-react-scripts-babel-macros)
[a while back](https://github.com/facebookincubator/create-react-app/issues/2730#issuecomment-328153982)
and it worked well.

* Pin the version
2018-01-15 00:06:24 -05:00
Dan Abramov
22f9fe0d33 Always include destructuring transform (#3788)
* Always include destructuring transform

* Fix lint
2018-01-14 15:37:00 +00:00
Sophie Alpert
2e82ebb337 BSD+Patents -> MIT (#3189)
* File headers BSD+Patents -> MIT

* BSD+Patents -> MIT
2017-09-26 10:30:05 +01:00
Forbes Lindesay
8442cf313b Update link to issue blocking JSX hoisting (#2732) 2017-07-06 16:47:41 +01:00
Dan Abramov
50aaae6c1c Resolve regenerator runtime relative to react-scripts (#2175) 2017-05-16 15:40:16 +01:00
Joe Haddad
7b124e7fd4 Re-disable babel modules transform (#1894)
* Upgrade webpack & related deps

* Disable module transform (requires webpack 2+)
2017-03-26 23:50:36 -04:00
Michael Hsu
76680ae7eb docs(babel-preset): Update comment info about babel-preset-env. (#1787) 2017-03-09 21:06:44 -05:00
Valerii Sorokobatko
fe7b5c212b update to modern code style (#1738)
* mv create-react-app/index.js -> create-react-app/creteReactApp.js

* update to modern code style

* var -> cosnt

* set trailing-coma to es5 for prettier
2017-03-07 19:46:10 +00:00
Joe Haddad
24f38f8646 Switch to preset-env (#1742)
* Switch to preset-env
Disables webpack modules by enabling babel modules to resolve #1638

* Bump babel-core to match babel preset versions

* Add uglify to targets
2017-03-06 20:21:28 -05:00
Joe Haddad
2288ddf3b6 Support & test import() for non-bundled code (#1615)
* Test basic import syntax

* Compile import() in test, only support syntax otherwise
2017-02-25 00:03:12 -05:00
Christophe Hurpeau
1aa4b2b8cb babel-preset: remove babel-plugin-transform-es2015-parameters (#1598)
https://github.com/babel/babel/issues/4851 is closed
2017-02-21 16:36:55 +00:00
Dan Abramov
41632fb1a5 Revert "Bump babel deps and re-enable transform-react-constant-elements" (#1575) 2017-02-16 18:01:02 +00:00
Brian Ng
9c33f60239 Re-enable transform-react-constant-elements (#1552)
* Bump babel deps

* Re-enable transform-react-constant-elements

Resolves #553
2017-02-14 22:06:19 -05:00
Joe Haddad
fc49946ccb Add support for dynamic import & disable require.ensure (#1538)
* Disable require.ensure

* Replace require.ensure with import

* Add babel plugin for parsing import()

* Get the default

* Upgrade babel-eslint to support dynamic import

* Fix dep

* Update deps
2017-02-14 20:51:23 -05:00
Joe Haddad
12288836e1 Upgrade webpack (#1291)
* Upgrade webpack

* Address more webpack v2 ...

* Update html-webpack-plugin

* Remove LoaderOptionsPlugin from dev config

* ExtractTextPlugin still uses webpack 1 syntax
... and doesn't support complex options (yet)

* Grammar nit

* Update extract text webpack plugin

* - Remove webpack.LoaderOptionsPlugin
- Update deps

* Lerna hoists packages

* Update extract-text-webpack-plugin

* Update webpack-dev-server

* Remove imports for the tests

* stop removing babelrc
2017-02-11 14:11:00 -05:00
Dan Abramov
d8dfdb01c7 Fix Babel issues in tests by applying the right transforms (#1179) 2016-12-06 15:10:42 +00:00
Fabrizio Castellarin
7af5374ec9 [babel-preset-react-app] Temporary fix missing babel plugins (#1177)
* temporary fix missing babel plugins

* Add an issue link
2016-12-06 13:50:50 +00:00
Brian Ng
9c45b25281 Enable useBuiltIns option on object-rest-spread (#902)
* Enable useBuiltIns option on object-rest-spread

* note polyfill requirement

* Enable useBuiltIns with transform-react-jsx

* Add direct ref to transform-react-jsx
2016-11-22 00:08:58 +02:00
Vesa Laakso
4a7f78ed66 Remove unnecessary transform plugins for object spread to work (#1052)
* Update `babel-plugin-transform-object-rest-spread` to v6.19.0

The `babel-plugin-transform-object-rest-spread` v6.19.0 update will
allow us to remove the `babel-plugin-transform-es2015-destructuring` and
`babel-plugin-transform-es2015-parameters` as the object rest spread
transform will now work standalone and not require additional tranforms

* Remove unnecessary babel transform plugins from babel-preset-react-app

The `babel-plugin-transform-object-rest-spread` v6.19.0 update makes
these plugins unnecessary, as v6.19.0 can be used stand-alone
2016-11-17 16:14:36 +00:00
Sathish
80fe767bf2 Clears the usage of react-jsx-source & react-jsx-self (#992)
Explain the usage of react-jsx-source & react-jsx-self
2016-11-17 12:54:12 +00:00
Vesa Laakso
da1d534a6b Update babel-present-env and use node: 'current' as target (#1051)
* Update babel-preset-env to 0.0.8

Changes between 0.0.6 and 0.0.8 should be backwards compatible:
https://github.com/babel/babel-preset-env/blob/master/CHANGELOG.md

* Use `node: 'current'` as target for babel-preset-env

This replaces the hand-rolled node version setup with a new feature that
was introduced in babel-preset-env@v0.0.7

https://github.com/babel/babel-preset-env/blob/v0.0.7/CHANGELOG.md
2016-11-17 12:48:22 +00:00
Jeffrey Carl Faden
d7ecd92859 Enable babel parameters/destructuring for all versions of Node (#927)
* Enable babel parameters/destructuring for all versions of Node

* Add more descriptive comment explaining plugin use
2016-10-18 18:31:58 +01:00
Shubheksha Jalan
351e449ef0 Disable ES2015 transforms based on node version using babel-preset-env (#878)
* Disable ES2015 transforms based on node version using babel-preset-env

* pass major version number for node to babel-preset-env instead of version string

* use parseFloat() instead of parseInt() to parse node version

* fixed style nits
2016-10-11 12:25:43 +01:00
Dan Abramov
c4a936ece2 Add JSX source transform for better warnings (#716)
Fixes #700.
Read about it here: https://twitter.com/dan_abramov/status/779308833399332864.
2016-09-23 16:53:22 +01:00
Ville Immonen
5b85a3624f Extract Babel configuration to babel-preset-react-app (#701) 2016-09-22 20:17:54 +01:00