Commit Graph

197 Commits

Author SHA1 Message Date
Joe Haddad
27ac52ac2f Remove runtime alias hack (#5142)
* Remove runtime alias hack

* Pass absolute path to preset

* Change comment

* Give a relative path to absolute runtime

* Clean up config

* Tweak again

* Make absolute runtime the default

* Remove runtime package from error overlay
2018-09-27 16:52:43 -04:00
David Moodie
3b71621552 Workbox service worker (#4169)
* Add workbox service worker functionality

* Remove debug

* Set workboxConfig for when there isn't a cra config file

* Remove workbox configuration options as c-r-a isn't planning on supporting optional configuration

* Remove c-r-a config path from paths

* Add workbox service worker functionality

* Remove c-r-a config path from paths

* Inline the webpack workbox config

* Use settings reccommended by @jeffposnick

https://github.com/facebook/create-react-app/pull/4169/#issuecomment-422963072

* Fallback to public url index.html, not root

* Add one comment

* Update comment

* Correct regex
2018-09-27 11:51:42 -04:00
Joe Haddad
6510a27e8b Drop loader utils from react-scripts 2018-09-27 10:03:36 -04:00
Joe Haddad
ac5376f9b9 Publish
- babel-plugin-named-asset-import@0.2.0
 - babel-preset-react-app@4.0.0
 - confusing-browser-globals@1.0.1
 - create-react-app@2.0.0
 - eslint-config-react-app@3.0.0
 - react-app-polyfill@0.1.0
 - react-dev-utils@6.0.0
 - react-error-overlay@5.0.0
 - react-scripts@2.0.0
2018-09-26 14:00:59 -04:00
Joe Haddad
98b63a3f9f Update template browser defaults 2018-09-26 13:38:26 -04:00
Joe Haddad
5599eff861 Drop IE 11 support by default (#5090)
* Drop ie 11 support and move polyfills to a new package

* More useful directions for what entry point to use
https://github.com/facebook/create-react-app/pull/5090#discussion_r220313783

* Clear up what file this polyfill goes in
https://github.com/facebook/create-react-app/pull/5090#discussion_r220313980

* Polyfill `window`, not `global`

* Remove proxy polyfill file
2018-09-25 16:08:29 -04:00
Grady Kuhnline
fb6e6f70a3 Add postcss-preset-env, remove autoprefixer (#4716)
* add postcss-preset-env, remove autoprefixer

* limit to stage 4
2018-09-25 10:33:23 -04:00
Joe Haddad
2e19824dfd Update tons of packages (#5080) 2018-09-24 17:41:40 -04:00
Joe Haddad
03a709195f Revert "Add loader for .graphql files (#3909)" (#5076) 2018-09-24 12:48:58 -04:00
Joe Haddad
2150693d6f Upgrade svgr to v2 and disable Prettier/SVGO (#5062) 2018-09-21 16:00:28 -04:00
Jack Zhao
58e00a3109 Bump (peer) dependencies to ESLint 5.6 (#5050) 2018-09-21 07:35:02 -04:00
Joe Haddad
e2dc3fc5a4 Lessen significance of browserslist
Adjust the default browsers to be a single list and remove it from the build output; it only affects CSS now
2018-09-20 16:48:45 -04:00
Joe Haddad
0da9f2d6c2 Switch back to main eslint-loader
Closes #5020
2018-09-20 10:21:52 -04:00
Joe Haddad
0bdbe42768 Upgrade to Babel 7 stable (#5042)
Closes #4932, Closes #4876
2018-09-20 10:17:09 -04:00
Joe Haddad
25ebe01399 Upgrade react-scripts dependencies (#5032)
* No lock files prevents the use of yarn upgrade & outdated

* Update deps

* Bump Jest across the board

* Add safe postcss parser
2018-09-19 14:44:08 -04:00
Joe Haddad
c1ccbbc282 Upgrade html-webpack-plugin to fix tests (#5031)
* Upgrade html webpack plugin

* Fix build
2018-09-19 12:09:18 -04:00
Joe Haddad
50b4857ff8 Revert "Add support for yarn and lerna monorepos. (#3741)"
This reverts commit b43ad04b88.
2018-09-18 14:31:19 -04:00
Joe Haddad
cc328d6287 Revert "Use yarn when running inside yarn workspace. (#3997)"
This reverts commit 2c34d5b66e.
2018-09-18 14:31:19 -04:00
Joe Haddad
2300f9e983 Switch from uglifyjs to terser (#5026)
Uglify is no longer maintained and has bugs not present in Terser (its successor)
2018-09-18 14:31:02 -04:00
Joe Haddad
22353ecf02 Fix ESLint output formatting
The `formatter` option is incompatible with with `thread-loader`.
The `formatter` option previously accepted a function which was lost during JSON serialization.
2018-09-17 19:59:14 -04:00
Joe Haddad
311215d161 Upgrade webpack and thread-loader 2018-09-17 19:59:14 -04:00
Joe Haddad
a3707eb642 Pin package versions 2018-09-17 19:59:14 -04:00
Tore Hammervoll
11580f22f2 Update jest version (#4846)
* Update jest version

* Update babel-jest version

* Use testURL: http://localhost in jest configs.

* Update to jest version 23.5

This version of jest includes a fix for https://github.com/jsdom/jsdom/issues/2304

* "testURL": "http://localhost" is default with jest v23.5
2018-09-17 01:28:16 +01:00
Anna Henningsen
7b7acde872 Update webpack-dev-server 3.1.5 → 3.1.7 (#4955)
This fixes the functionality of this dependency for Node 10 and above.

Refs: https://github.com/webpack/webpack-dev-server/pull/1451
Refs: https://github.com/nodejs/node/issues/21665
2018-09-02 21:02:29 +01:00
Dan Abramov
96ba7bddc1 Bump versions 2018-08-22 19:44:29 +01:00
Vladimir Kutepov
8169a93e38 Bump babel-loader to fix npm warning (#4776) 2018-07-23 01:15:41 -04:00
Joshua Comeau
7c85938458 Create a --stats flag for react-scripts build. Update README.
To analyze Webpack bundles, a "stats" JSON is required.

This PR allows that file to be created and saved to the `build`
directory, so that users can use it with Webpack-specific insight
tools like `webpack-bundle-analyzer` without ejecting their
application.

Updated the README to include details for how to do this.
2018-05-31 07:23:13 -04:00
Jack Zhao
581c453610 Scope hoisting in webpack 4 (#4504) 2018-05-24 18:32:06 -04:00
Andreas Cederström
d72678fb0c - [x] Upgrade to webpack 4.8.X (#4077)
- [x] Utilize webpack 4 development and production modes
- [x] Upgrade webpack dev server
- [x] Webpack 4 compatible release of thread-loader
- [x] Webpack 4 compatible release of HtmlWebpackPlugin
- [x] Webpack 4 compatible release of SwPrecacheWebpackPlugin
- [x] Webpack 4 compatible release of WebpackManifestPlugin
- [x] Update README
- [x] Update WebpackDevServerUtils
- [x] Update InterpolateHtmlPlugin
- [x] Update ModuleScopePlugin
- [x] Update WatchMissingNodeModulesPlugin
- [x] Move UglifyJS options to webpack 4 optimize
- [x] Move InterpolateHtmlPlugin to make it tapable on HtmlWebpackPlugin
- [x] vendor splitting via splitChunks.splitChunks (https://twitter.com/wSokra/status/969633336732905474)
- [x] long term caching via splitChunks.runtimeChunk (https://twitter.com/wSokra/status/969679223278505985)
- [x] Make sure process.env.NODE_ENV is proxied correctly to `react-error-overlay`
- [x] Implicit webpack.NamedModulesPlugin in dev config as its default in webpack 4
- [x] Disable webpack performance hints as we have our own filesize reporter
- [x] Replace ExtractTextPlugin with MiniCssExtractPlugin
- [x] Switch to css whole file minification via OptimizeCSSAssetsPlugin rather than per module css minification to gain performance
2018-05-20 18:22:24 +01:00
Ian Sutherland
69cc07f2e3 Update svgr (#4461)
* Update svgr to 1.9.2 in order to reduce install size
2018-05-14 14:43:47 -06:00
Mikhail Osher
458336bef6 Update sass-loader to 7.0.1 (#4376)
* Update sass-loader (#4363)

* Added bootstrap scss test (#4376)
2018-04-27 18:32:20 -06:00
Chad Greenburg
32eebfeb7f Bumped jest version to 22.4.1 (#4362)
* Updated jest version.
2018-04-27 08:04:21 +02:00
Andreas Cederström
0fe6fea6e4 bump babel 7 to beta 46 2018-04-27 07:53:56 +02:00
wtgtybhertgeghgtwtg
66cc7a903e Bump fsevents. (#4331) 2018-04-20 23:51:55 -04:00
Fabiano Brito
bf3d73c2c6 Add Sass loader (#4195)
* Installs and adds sass loader task in webpack for dev environment.

* Uses Timer's branch of sass-loader without node-sass dependency.

* Adds method for handling SASS modules.

* Fixes extension of excluded files when looking for scss modules.

* Adds support for both .scss and .sass extensions.

* Uses ExtractTextPlugin with sass-loader to bundle styles for the production build.

* Bundles SASS modules for the production build.

* Uses the latest version of sass-loader.

* Adds function to create different rules for style loaders in dev environment.

* Abstracts style loaders to a common function to avoid repetition.

* Simplifies the common function that creates style loaders.

* Creates assets for testing SASS/SCSS support.

* Creates mock components and unit tests for SASS and SCSS with and without modules.

* Creates integration tests for SASS/SCSS support.

* Adds node-sass as a template dependency so sass-loader can be tested.

* Includes sass tests when test component is mounted.

* Fixes asserted module name for sass and scss modules tests.

* Removes tests against css imports in SCSS and SASS files.

* Updates sass-loader to v7.

* Uses getCSSModuleLocalIdent from react-dev-utils.

* Fixes tests to match the use of getCSSModuleLocalIdent.

* Improves readability of getStyleLoader function.

* Uses postcss after sass.

* Refactors dev config to simplify common function for style loaders.

* Refactors prod config to simplify common function for style loaders.

* Use importLoaders config according to css-loader docs.
2018-04-18 10:35:55 -06:00
Ro Savage
ae2cf07249 Update CSS Modules localIndetName (#4192)
* Update CSS Modules localIndetName

* Add missing file to package

* Correct regex

* plz plz plz
2018-04-13 16:14:31 -04:00
Andreas Cederström
06176e1ea4 bump babel 7 beta (#4253) 2018-04-05 07:28:30 +02:00
Dan Abramov
3b102fe1b9 Work around Jest environment resolving bug (#4247) 2018-04-03 18:44:59 +01:00
Ian Sutherland
8a34b7cc77 Add ESLint check for incorrect propTypes usage (#3840) (#4048) 2018-03-25 16:17:41 -06: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
Ian Sutherland
43fbf0f3d6 Update dotenv to 5.0.0 (#4009) 2018-02-10 12:45:40 -07:00
bradfordlemley
2c34d5b66e Use yarn when running inside yarn workspace. (#3997)
* Run yarn after ejecting.

* On eject, choose to run yarn instead of npm if yarn is available.

* Move monorepo to react-dev-utils.

* Fix lint.

* Rename monorepo to workspaceUtils.

* Add react-dev-utils dep for create-react-app.

* getMonorepo -> findMonorepo
2018-02-10 13:07:19 +00:00
Ian Sutherland
c263f17784 Upgrade dotenv-expand to 4.2.0 (#3961) (#3992) 2018-02-09 13:11:32 +00:00
Pete Nykänen
779dad5546 Add loader for .graphql files (#3909)
* Add graphql loader to webpack config

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Update README.md

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Update react-scripts README.md

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Add graphql jest transform

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Add integration tests, pin versions in package.json

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Tests expect regexp matchers

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Use strict equal test instead

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Escaping is hard

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Add comment for signifying a different file

* Update docs

* Fix jest config

* Remove node_modules exclusion

* Update README.md

* Inline graphql jest transform

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Update copyright header

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>

* Use .graphql extension only

Signed-off-by: petetnt <pete.a.nykanen@gmail.com>
2018-02-03 15:51:55 +00:00
Ian Sutherland
d0e17316b9 Named asset import for SVG files (#3907)
* Add named asset import for svg files via babel plugin and webpack loader.

* Fix failing e2e test

* Switched to svgr loader

* Updated SVG component test

* Disable named asset import plugin in test environment

* Added tests for including SVG in CSS

* Update tests

* Moved babel plugin config into webpack config
2018-02-02 12:56:57 -07:00
bradfordlemley
b43ad04b88 Add support for yarn and lerna monorepos. (#3741)
* Support for multiple source paths via package.json srcPaths entry.

Initial support for yarn workspace.

Support lerna workspace, fix for when to use template files.

Remove support for specifying srcPaths in package.json.

Re-enable transpilation caching.

* Clean up, use file matching (similar to original) in webpack configs instead of matching function.

* Remove package lock files.

* Fix for eject.
Note: monorepos won't work after eject.
Can be fixed easily with JEST 22.0.?+ which has file pattern matches against realpaths.

* Filter tests to run only tests in monorepo components included by the app.
(Not sure this is desireable, might be cool to be able to easily run all tests in monorepo from one app.)

* Fix conditions for when to use template.

* Fix eject.

* Remove code that is not needed w/ Jest 22.

* Include all cra-comp tests in monorepo instead of trying to include only tests that are dependencies of app.
(tests can be easily filtered via jest cli if desired, e.g. 'npm test -- myapp comp1')

* Pin find-pkg version.

* Hopefully fix jest test file matching on windows by removing first slash.

* E2E tests for monorepo.

* Run monorepo tests in CI.

* Fix and test post-eject build.

* Fix e2e test.

* Fix test suite names in appveyor.

* Include individual package dirs as srcPaths instead of top-level monorepo root.
Fixes build/start after eject.

* Fix running tests after eject.

* Clean up test workspace, add some verifcations.

* Cleanup.

* Try to fix hang when running test on appveyor.

* Don't write babel or lint config to package.json when ejecting.

* Incorporate review comments.
* Simply monorepo pkg finder
* Only include monorepo pkgs if app itself is included in monorepo
* Check for specific tests in e2e

* Fixes for windows.

* Fix for kitchensink mocha tests compiling.

* Add lerna monorepo test.

* Fix lerna bootstrap on windows.

* Incorporate more review comments:
* remove support for lerna w/o yarn workspace
* add react and react-dom as devDeps to comp1 and comp2

* Add monorepo info to user guide.
2018-02-01 20:58:18 +00:00
Michaël De Boey
3767d91886 Fix package repository name (#3900) 2018-01-23 00:25:03 +00:00
Michaël De Boey
25184c4e91 Fix links to package (#3898) 2018-01-22 22:16:22 +00:00
Joe Haddad
9754a23170 Bump deps 2018-01-18 00:04:38 -05:00
Dan Abramov
406ab6c3c0 Bump Babel 2018-01-17 20:44:59 +00:00