Skip to content
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

PWA functionality for create-react-app #1

Closed
wants to merge 121 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
8289386
sw-precache-webpack-plugin, SW registration, manifest.json
jeffposnick Feb 11, 2017
8ec99b6
Suggest jest-enzyme for simplifying test matchers (#994)
blainekasten Feb 11, 2017
1fe6f55
Add SASS support documentation #1007 (#1008)
tsironis Feb 12, 2017
e8ae98d
Link to new Sass doc
gaearon Feb 12, 2017
071d996
Clarify Less/Sass support
gaearon Feb 12, 2017
f840b4d
Fix `test -e` with wildcard arguments. (#1503)
marcusrbrown Feb 12, 2017
9ffa9e4
Correctly Command in README.md (#1275)
lifez Feb 12, 2017
c7ba130
reactjs/redux#2004 List features beyond ES6 supported by create-react…
jonathanconway Feb 12, 2017
96ebb75
Add a link to supported features
gaearon Feb 12, 2017
ca7fb22
[documentation] how to disable autoprefix feature (#1320)
Feb 12, 2017
6c85568
Added link to Azure deployment tutorial (#1338)
tpetrina Feb 12, 2017
75088ab
Documentation + a few SW tweaks.
jeffposnick Feb 12, 2017
434e858
Add useful link to react-scripts (#1495)
pd4d10 Feb 12, 2017
411347f
Update language support wording to ES2017
Timer Feb 12, 2017
c9bc6ce
Tweak syntax doc (#1539)
gaearon Feb 12, 2017
915b130
Make node version check more robust in e2e.sh (#1295)
pugnascotia Feb 13, 2017
ce0d6ee
update CSS preprocessor instructions (#1543)
Feb 13, 2017
9df3104
Revert "Don't run CI on Node 0.10" (#1547)
Timer Feb 13, 2017
745d341
Use Yarn latest in e2e (#1534)
gaearon Feb 15, 2017
fc49946
Add support for dynamic import & disable require.ensure (#1538)
Timer Feb 15, 2017
1d5a277
Enable `watchContentBase` for webpack-dev-server (#1546)
SpaceK33z Feb 15, 2017
9c33f60
Re-enable transform-react-constant-elements (#1552)
existentialism Feb 15, 2017
6d22a78
modified documentation for setting up jest-enzyme (#1562)
kiranps Feb 15, 2017
b0bc46e
Use https in link to Ignoring files at Github (#1561)
Feb 15, 2017
075e729
add --recursive to sass watch script (#1564)
Feb 15, 2017
5e65f0d
Mention Windows support explicitly
gaearon Feb 15, 2017
c8cbbd0
Reorder
gaearon Feb 16, 2017
1fc1d82
Update README.md (#1573)
mkermani144 Feb 16, 2017
e9493a2
MacOS => macOS
gaearon Feb 16, 2017
41632fb
Revert "Bump babel deps and re-enable transform-react-constant-elemen…
gaearon Feb 16, 2017
bfed215
Added an unregister method, too, just in case.
jeffposnick Feb 16, 2017
2835105
More info for the READMEs.
jeffposnick Feb 16, 2017
2dc418b
Add minify to SWPrecacheWebpackPlugin config
goldhand Feb 17, 2017
21d14bb
Fix SWPrecacheWebpackPlugin typo
goldhand Feb 17, 2017
a681e91
Fix file references in READMEmd
ianschmitz Feb 17, 2017
a9fb906
Add instructions for testing service-worker locally
goldhand Feb 17, 2017
bee4ece
Switch from Neo to Neutrino (#1576)
eliperelman Feb 17, 2017
dd9ec7b
fixes #1584 PORT env variable not always an integer (#1585)
matoilic Feb 18, 2017
1aa4b2b
babel-preset: remove babel-plugin-transform-es2015-parameters (#1598)
christophehurpeau Feb 21, 2017
2a8535b
Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable …
AJamesPhillips Feb 22, 2017
d945370
Allow --scripts-version to be a git url (#1570)
tomconroy Feb 23, 2017
a82896c
Install react, react-dom, and react-scripts at the same time (#1253)
n3tr Feb 23, 2017
21fe19a
Bump deps for webpack 2 compat (#1621)
Timer Feb 23, 2017
7be0f4d
add a comment about NODE_ENV value set to 'production' during build s…
mderazon Feb 24, 2017
646690b
Update flow configuration documentation (#1518)
SBrown52 Feb 24, 2017
92a0680
Add note about when to import bootstrap CSS. (#1618)
joewoodhouse Feb 24, 2017
67d0d49
Document Sass imports
gaearon Feb 24, 2017
bec009c
Fix workflow if react-scripts package is linked via npm-link (#1356)
tuchk4 Feb 24, 2017
577c4e8
Document debugging in the browser. (#1540)
bondz Feb 24, 2017
e14e003
Link to "Debugging in the Editor"
gaearon Feb 24, 2017
0ef9e80
(feat): add webpack validation error logging (#1596)
johann-sonntagbauer Feb 24, 2017
09cfcde
Add lint rule to disallow require.ensure and System.import (#1536)
tharakawj Feb 24, 2017
c3240a1
Adding link to “Customizing” create-react-app (#1121)
Feb 24, 2017
1c0851d
Update index.js (#1603)
driquelme Feb 24, 2017
d6a83aa
Remove .bin files defined at react-scripts/package.json after eject …
tuchk4 Feb 24, 2017
41d1469
Bump `recursive-readdir`. (#1560)
wtgtybhertgeghgtwtg Feb 24, 2017
dd801e2
Disallow event global variable with no-restricted-globals rule (#1530…
vfil Feb 24, 2017
c8d9c47
Added a how-to on react-snapshot (#1577)
superhighfives Feb 24, 2017
53db95a
NPM version check for tip (#1193)
rangle-mobinni Feb 24, 2017
8d41328
Enable eslint caching in development (#1578)
viankakrisna Feb 24, 2017
925ab72
Use real build path name in build output (#1478)
chyipin Feb 24, 2017
5155797
adding a note on how to resolve "Could not find a required file." dep…
Feb 24, 2017
b609ac9
Use posix paths for Jest config during eject (#1635)
Timer Feb 24, 2017
dbf17fd
Setting a dynamic port value for the pushstate-server URL text (#1628)
mattccrampton Feb 24, 2017
3289c32
Fix up broken line
gaearon Feb 24, 2017
2288ddf
Support & test import() for non-bundled code (#1615)
Timer Feb 25, 2017
6876c40
Gracefully handle initial installation error (#1512)
chitchu Feb 25, 2017
f3d8fff
Published 0.9.1 at 9e2624f332eea9032051dceb95eebfad5c158561
Timer Feb 26, 2017
e1aaf39
Add changelog for 0.9.1
Timer Feb 26, 2017
f68cc67
Update changelog
Timer Feb 26, 2017
253c1e0
Add a note about known issue
gaearon Feb 26, 2017
2f6fac9
Fix npm test on Windows (#1647)
gaearon Feb 26, 2017
fbae44a
Add 0.9.2 changelog
gaearon Feb 26, 2017
ba5da93
0.9.2
gaearon Feb 26, 2017
e1e28d9
Merge changelogs
gaearon Feb 26, 2017
68e9bb9
Format differently
gaearon Feb 26, 2017
432ba82
Set Chrome userDataDir to be under .vscode folder (#1657)
ryansully Feb 27, 2017
d0695f7
Fix e2e when used with cold cache (#1667)
Timer Feb 27, 2017
a1858c7
Fix e2e-simple (cont.)
Timer Feb 27, 2017
a3a223a
Add appveyor.yml (#1648)
Timer Feb 27, 2017
2d93ae1
fix react dependency versions during initial install (#1669)
johann-sonntagbauer Feb 28, 2017
715968e
Remove Windows 0.10 simple test
Timer Feb 28, 2017
c51a611
add project name validation (#1662)
johann-sonntagbauer Feb 28, 2017
3509dcd
fix project cleanup on windows (#1675)
johann-sonntagbauer Feb 28, 2017
7c899fc
Revert "Enable eslint caching in development" (#1665)
gaearon Feb 28, 2017
2b824d8
add X-FORWARDED headers for proxy requests (#1677)
johann-sonntagbauer Feb 28, 2017
bf948bf
Use offline cached version with yarn when it's possible (#1423)
voxsim Feb 28, 2017
15e1ec2
Add 0.9.3 changelog (#1683)
gaearon Feb 28, 2017
ee3b788
Add "migrating" section for 0.9.3
gaearon Feb 28, 2017
a85ae1d
False expression should not be in dependencies
Timer Feb 28, 2017
10a8dc6
Published 0.9.3 from 0.9.x
gaearon Feb 28, 2017
342867e
appveyor: Build all branches
Timer Mar 1, 2017
1a838dc
Published CLI from 0.9.x
Timer Feb 28, 2017
60ba9f2
Suggest CRA 1.2.1 in changelog
gaearon Mar 1, 2017
af6a0ff
Fixed missing flag in first preprocess command (#1687)
mklemme Mar 1, 2017
43139bc
Re-enable e2e-install directory test
Timer Mar 1, 2017
404c354
Suggest to use .env for enabling polling mode (#1698)
gaearon Mar 2, 2017
45d1d24
Update extract-text-webpack-plugin to latest (#1700)
SimenB Mar 2, 2017
db64278
Diagnostic code (#1695)
tgig Mar 2, 2017
c7a9dae
Fix Jest tests for Cygwin
Timer Mar 3, 2017
1cdb4cd
Merge pull request #2 from goldhand/pwa
jeffposnick Mar 3, 2017
4e3ede4
Review feedback
jeffposnick Mar 3, 2017
59cab8f
Improve reliability of port hint. (#1696)
chrisdrackett Mar 3, 2017
b88d665
Modularise scripts (#1433)
djgrant Mar 4, 2017
72695a1
Remove unneeded `url` lib (#1715)
pd4d10 Mar 4, 2017
b421ed9
pin and bump lerna (#1688)
viankakrisna Mar 4, 2017
8951fbe
Lerna 2.0.0-beta.38 expects packages entry
Timer Mar 4, 2017
443ca23
Add docs for apache's client side routing setting (#1717)
viankakrisna Mar 5, 2017
3fe8289
Update now.sh deployment instructions. (#1710)
replaid Mar 5, 2017
19a4672
Add support for ignoreRestSiblings in no-unused-vars (#1705)
chrisdrackett Mar 5, 2017
4ec5af3
add double quotes to escape spaces in paths in e2e (#1707)
viankakrisna Mar 5, 2017
ae61bf6
Create appveyor.cleanup-cache.txt
gaearon Mar 5, 2017
9d8096e
Link Appveyor caches to appveyor.cleanup-cache.txt
gaearon Mar 5, 2017
23f85d3
Trigger AppVeyor cache cleanup
gaearon Mar 5, 2017
d07accb
Fix openBrowser() when BROWSER=open on macOS (#1690)
bpierre Mar 5, 2017
5414cff
Create empty package.json in e2e test (#1401) (#1402)
matoilic Mar 5, 2017
01c3597
Skip AppVeyor CI builds for Markdown changes (#1723)
gaearon Mar 5, 2017
ed9eeeb
Don't use ES6 in a file that should run on Node 4 (#1724)
gaearon Mar 5, 2017
13f26e3
Bump jsx-a11y version (#1542)
bondz Mar 5, 2017
86d590d
Some additional PWA metadata
jeffposnick Mar 5, 2017
0640a20
Merge remote-tracking branch 'upstream/master' into pwa
jeffposnick Mar 5, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea/
.vscode/
node_modules/
build
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cache:
- node_modules
- packages/create-react-app/node_modules
- packages/react-scripts/node_modules
install: true
script:
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
Expand All @@ -21,5 +22,7 @@ env:
- TEST_SUITE=kitchensink
matrix:
include:
- node_js: 0.10
env: TEST_SUITE=simple
- node_js: 6
env: USE_YARN=yes TEST_SUITE=simple
262 changes: 229 additions & 33 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Following these guidelines helps to communicate that you respect the time of the

As much as possible, we try to avoid adding configuration and flags. The purpose of this tool is to provide the best experience for people getting started with React, and this will always be our first priority. This means that sometimes we [sacrifice additional functionality](https://gettingreal.37signals.com/ch05_Half_Not_Half_Assed.php) (such as server rendering) because it is too hard to solve it in a way that wouldn’t require any configuration.

We prefer **convention, heuristics, or interactivity** over configuration.
We prefer **convention, heuristics, or interactivity** over configuration.<br>
Here’s a few examples of them in action.

### Convention
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Create React apps with no build configuration.
* [Getting Started](#getting-started) – How to create a new app.
* [User Guide](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.

Create React App works on macOS, Windows, and Linux.<br>
If something doesn’t work please [file an issue](/~https://github.com/facebookincubator/create-react-app/issues/new).

## tl;dr

```sh
Expand All @@ -13,7 +16,6 @@ npm install -g create-react-app
create-react-app my-app
cd my-app/
npm start

```

Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
Expand Down Expand Up @@ -70,7 +72,7 @@ my-app/
No configuration or complicated folder structures, just the files you need to build your app.<br>
Once the installation is done, you can run some commands inside the project folder:

### `npm start`
### `npm start` or `yarn start`

Runs the app in development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
Expand All @@ -80,20 +82,21 @@ You will see the build errors and lint warnings in the console.

<img src='/~https://camo.githubusercontent.com/41678b3254cf583d3186c365528553c7ada53c6e/687474703a2f2f692e696d6775722e636f6d2f466e4c566677362e706e67' width='600' alt='Build errors'>

### `npm test`
### `npm test` or `yarn test`

Runs the test watcher in an interactive mode.<br>
By default, runs tests related to files changes since the last commit.

[Read more about testing.](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)

### `npm run build`
### `npm run build` or `yarn build`

Builds the app for production to the `build` folder.<br>
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
A [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) using an [offline-first caching strategy](https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network) is automatically generated.<br>
Your ([progressive web](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)) app is ready to be deployed!

## User Guide

Expand All @@ -102,13 +105,16 @@ The [User Guide](/~https://github.com/facebookincubator/create-react-app/blob/mast
- [Updating to New Releases](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases)
- [Folder Structure](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#folder-structure)
- [Available Scripts](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#available-scripts)
- [Supported Language Features and Polyfills](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#supported-language-features-and-polyfills)
- [Syntax Highlighting in the Editor](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#syntax-highlighting-in-the-editor)
- [Displaying Lint Output in the Editor](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor)
- [Debugging in the Editor](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-in-the-editor)
- [Changing the Page `<title>`](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#changing-the-page-title)
- [Installing a Dependency](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#installing-a-dependency)
- [Importing a Component](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#importing-a-component)
- [Adding a Stylesheet](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-stylesheet)
- [Post-Processing CSS](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#post-processing-css)
- [Adding a CSS Preprocessor (Sass, Less etc.)](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)
- [Adding Images and Fonts](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-and-fonts)
- [Using the `public` Folder](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder)
- [Using Global Variables](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables)
Expand All @@ -120,6 +126,7 @@ The [User Guide](/~https://github.com/facebookincubator/create-react-app/blob/mast
- [Proxying API Requests in Development](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development)
- [Using HTTPS in Development](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-https-in-development)
- [Generating Dynamic `<meta>` Tags on the Server](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#generating-dynamic-meta-tags-on-the-server)
- [Pre-Rendering into Static HTML Files](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#pre-rendering-into-static-html-files)
- [Running Tests](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
- [Developing Components in Isolation](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#developing-components-in-isolation)
- [Making a Progressive Web App](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)
Expand Down Expand Up @@ -151,6 +158,7 @@ Please refer to the [User Guide](/~https://github.com/facebookincubator/create-rea
* Import CSS and image files directly from JavaScript.
* Autoprefixed CSS, so you don’t need `-webkit` or other prefixes.
* A `build` script to bundle JS, CSS, and images for production, with sourcemaps.
* An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria.

**The feature set is intentionally limited**. It doesn’t support advanced features such as server rendering or CSS modules. The tool is also **non-configurable** because it is hard to provide a cohesive experience and easy updates across a set of tools when the user can tweak anything.

Expand All @@ -173,7 +181,7 @@ Some features are currently **not supported**:
* Server rendering.
* Some experimental syntax extensions (e.g. decorators).
* CSS Modules.
* LESS or Sass.
* Importing LESS or Sass directly ([but you still can use them](/~https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)).
* Hot reloading of components.

Some of them might get added in the future if they are stable, are useful to majority of React apps, don’t conflict with existing tools, and don’t introduce additional configuration.
Expand Down Expand Up @@ -210,7 +218,7 @@ If you don’t agree with the choices made in this project, you might want to ex
Some of the more popular and actively maintained ones are:

* [insin/nwb](/~https://github.com/insin/nwb)
* [mozilla/neo](/~https://github.com/mozilla/neo)
* [mozilla-neutrino/neutrino-dev](/~https://github.com/mozilla-neutrino/neutrino-dev)
* [NYTimes/kyt](/~https://github.com/NYTimes/kyt)
* [zeit/next.js](/~https://github.com/zeit/next.js)
* [gatsbyjs/gatsby](/~https://github.com/gatsbyjs/gatsby)
Expand Down
6 changes: 6 additions & 0 deletions appveyor.cleanup-cache.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Edit this file to trigger a cache rebuild.
http://help.appveyor.com/discussions/questions/1310-delete-cache

----
Just testing if this works.
Hello, world.
40 changes: 40 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
environment:
matrix:
- nodejs_version: 6
test_suite: "simple"
- nodejs_version: 6
test_suite: "installs"
- nodejs_version: 6
test_suite: "kitchensink"
- nodejs_version: 4
test_suite: "simple"
- nodejs_version: 4
test_suite: "installs"
- nodejs_version: 4
test_suite: "kitchensink"

cache:
- node_modules -> appveyor.cleanup-cache.txt
- packages\react-scripts\node_modules -> appveyor.cleanup-cache.txt

clone_depth: 50

matrix:
fast_finish: true

platform:
- x64

install:
- ps: Install-Product node $env:nodejs_version $env:platform

build: off

skip_commits:
files:
- '**/*.md'

test_script:
- node --version
- npm --version
- sh tasks/e2e-%test_suite%.sh
7 changes: 5 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.0.0-beta.37",
"lerna": "2.0.0-beta.38",
"version": "independent",
"changelog": {
"repo": "facebookincubator/create-react-app",
Expand All @@ -12,5 +12,8 @@
"tag: internal": ":house: Internal"
},
"cacheDir": ".changelog"
}
},
"packages": [
"packages/*"
]
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"test": "node packages/react-scripts/scripts/test.js --env=jsdom"
},
"devDependencies": {
"babel-eslint": "6.1.2",
"eslint": "3.5.0",
"eslint-config-react-app": "0.2.1",
"eslint-plugin-flowtype": "2.18.1",
"eslint-plugin-import": "1.12.0",
"eslint-plugin-jsx-a11y": "2.2.2",
"eslint-plugin-react": "6.3.0",
"lerna": "^2.0.0-beta.37",
"babel-eslint": "7.1.0",
"eslint": "3.16.1",
"eslint-config-react-app": "0.5.1",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "4.0.0",
"eslint-plugin-react": "6.4.1",
"lerna": "2.0.0-beta.38",
"lerna-changelog": "^0.2.3"
}
}
2 changes: 1 addition & 1 deletion packages/babel-preset-react-app/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# babel-preset-react-app

This package includes the Babel preset used by [Create React App](/~https://github.com/facebookincubator/create-react-app).
This package includes the Babel preset used by [Create React App](/~https://github.com/facebookincubator/create-react-app).<br>
Please refer to its documentation:

* [Getting Started](/~https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
Expand Down
14 changes: 6 additions & 8 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ if (env === 'development' || env === 'test') {
}

if (env === 'test') {
plugins.push.apply(plugins, [
// We always include this plugin regardless of environment
// because of a Babel bug that breaks object rest/spread without it:
// /~https://github.com/babel/babel/issues/4851
require.resolve('babel-plugin-transform-es2015-parameters')
]);

module.exports = {
presets: [
// ES features necessary for user's Node version
Expand All @@ -82,7 +75,10 @@ if (env === 'test') {
// JSX, Flow
require.resolve('babel-preset-react')
],
plugins: plugins
plugins: plugins.concat([
// Compiles import() to a deferred require()
require.resolve('babel-plugin-dynamic-import-node')
])
};
} else {
module.exports = {
Expand All @@ -102,6 +98,8 @@ if (env === 'test') {
// Async functions are converted to generators by babel-preset-latest
async: false
}],
// Adds syntax support for import()
require.resolve('babel-plugin-syntax-dynamic-import'),
])
};

Expand Down
5 changes: 3 additions & 2 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-react-app",
"version": "2.1.0",
"version": "2.1.1",
"description": "Babel preset used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
Expand All @@ -11,8 +11,9 @@
"index.js"
],
"dependencies": {
"babel-plugin-dynamic-import-node": "1.0.0",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.22.0",
"babel-plugin-transform-es2015-parameters": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.22.0",
"babel-plugin-transform-react-constant-elements": "6.22.0",
"babel-plugin-transform-react-jsx": "6.22.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-app/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# create-react-app

This package includes the global command for [Create React App](/~https://github.com/facebookincubator/create-react-app).
This package includes the global command for [Create React App](/~https://github.com/facebookincubator/create-react-app).<br>
Please refer to its documentation:

* [Getting Started](/~https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
Expand Down
Loading