Commit Graph

1529 Commits

Author SHA1 Message Date
Marius Gedminas
fffe909731 Move whitespace comment closer to where it applies (#4566) 2018-06-05 11:58:47 -04:00
Dan Abramov
6370e40aad Temporarily remove doc section on webpack analyzer (#4564) 2018-06-05 14:58:06 +02:00
Jack Zhao
a98c3df3bb Merge pull request #3945 from joshwcomeau/bundle-stats
Allow bundles to be analyzed with Webpack-specific tools
2018-06-04 01:10:47 -07:00
Josh Comeau
80b24d54d9 Remove outdated bit from README, update bundle-analyzer link 2018-06-03 09:04:11 -04:00
Reuben Antz
227c44f4fa Update file tree view (#4546)
Update file tree view
2018-06-01 08:19:33 -04:00
Jack Zhao
76ef9fadb6 Merge pull request #4014 from viankakrisna/enable-manifest-plugin-on-dev
enable manifest plugin on dev
2018-05-31 10:26:38 -07: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
c1b0175253 Merge pull request #3929 from maciej-ka/remove-trailing-spaces-from-copyright
Remove trailing spaces from copyright
2018-05-30 21:46:43 -07:00
Joe Haddad
72906d9949 Adjust browser defaults (#4470) 2018-05-24 18:45:10 -04:00
Jack Zhao
581c453610 Scope hoisting in webpack 4 (#4504) 2018-05-24 18:32:06 -04:00
Graeme
61c864c38a Update paths.js, rename shadow path variable (#4435)
* Update paths.js, rename shadow path variable

This file requires the "path" module and sets it to a variable `path`. The function `ensureSlash` also has a variable `path` that then shadows the `path` module.

* Update paths.js
2018-05-22 21:11:20 -06:00
Saimon Moore
86a82b1626 Update docs about High Sierra npm test issues (#4497) 2018-05-22 10:19:25 -06:00
Luis Nell
0dfc6f6e07 Update node-sass-chokidar docs (#4205)
* Removes Chokidar Recursive Flag

According to the changelog it is not necessary anymore as it doesn't do anything.

* Removes initial build on SCSS watch

Chokidar now does this on it's own.

* Removes sass watch recursive, default include-path

as proposed by @michaelwayman

* Removes another left-over build-css
2018-05-20 23:31:26 +01:00
jamesvsshark
e645d3e879 Fix typo in createReactApp.js warning message (#4309) 2018-05-20 13:56:49 -06:00
Craig Mulligan
0e0f260e35 .mjs should not resolve before .js files (#4085) (#4318)
Support for .mjs files added in #3239 did not account for npm libraries which ship native mjs files alongside js files. This accounts for this by ensuring .js files resolve before their accompanying .mjs file. Note that this is not an ideal end state since selecting a .mjs over a .js extension should be the result of whether `import` was used instead of `require()` in a node environment with native ESM support (currently via `--experimental-modules`). Instead, this change just *always* selects a .js extension before the .mjs extension if it exists.

This unbreaks support for using GraphQL (relay, apollo, etc) within create-react-app projects.
2018-05-20 20:27:31 +01:00
Jack Zhao
d1454febd1 Webpack4 (#4490)
* - [x] Upgrade to webpack 4.8.X
- [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

* disable module concatenation

* fix cleanup

* fix optimization

* restore tmp removal

* preserve

* fix css tests

* fix test run

* fix svg test

* revert tmp dir

* fix import

* fix import

* help debugging

* fix tests

* fix sass test

* restore cleanup
2018-05-20 18:25:57 +01: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
Mike Kusold
493a379c21 Map (css|sass|scss) modules to identity-obj-proxy in jest (#4419) 2018-05-15 21:03:22 -04: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
Jack Zhao
c2aa1632e6 Fix e2e:docker script (#4454)
* verdaccio configs

* verdaccio configs

* fix typo

* revert e2e-installs

* move config to tasks
2018-05-14 01:05:16 +01:00
shawn wang
0f84a4bcdb add create-react-app-parcel (#4449)
Add create-react-app-parcel to alternatives section in README
2018-05-11 22:33:59 -06:00
stereobooster
a8a64c3645 Update babel-plugin-macros (#4432)
Update babel-plugin-macros to 2.2.1.
2018-05-11 10:06:21 -06:00
Marco Fugaro
9843be53f5 Update the thread loader test in errors (#4420) 2018-05-09 00:37:19 -04:00
William Chargin
3aaddefc51 ensureSlash: Fix accidental string-to-NaN coercion (#4424)
Summary:
The `hasSlash` method uses `path.substr(path, path.length - 1)` to
remove the last character from `path`. Clearly, the first parameter is
suspect; it should be `0`. The code works as written, but only very
accidentally: the first parameter is coerced by `ToNumber` to `NaN`,
which is then coerced by `ToInteger` to `+0`, per [the spec][1].

[1]: https://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.substr

Test Plan:
Reading the spec should be sufficient. To verify in the Real World:
```js
const path = "has-slash-but-does-not-need-slash/"
const a = path.substr(path, path.length - 1);
const b = path.substr(0, path.length - 1);
console.log(a === b);  // true
console.log(a);        // has-slash-but-does-not-need-slash
```

wchargin-branch: ensureslash-accidental-coercion
2018-05-08 19:31:25 -04:00
arianon
e5e9f59a4e Update getCSSModuleLocalIdent to support Sass (#4391)
* Update getCSSModuleLocalIdent to support Sass

* Fix Sass/SCSS index module tests

Also make them more consistent with the non-index variants.
2018-05-08 13:07:41 -04:00
Trevor Brindle
7b2eae1745 Update envinfo and issue template (#4375)
* fix: update envinfo + implementation, update issue_template

* update envinfo to 5.4.0, add IE and Edge to —info command,
2018-04-30 10:44:43 -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
Mikhail Osher
da4a87f638 Support package distribution tags (#4350)
* Support package distribution tags (#4348)

* Remove redundand variable check in `getInstallPackage`

* Simplify react-scripts version using `--scripts-version=@tagname` notation

* Add dist-tag tests to e2e-installs
2018-04-27 08:45:18 -04:00
Andreas Cederström
cc36849ca8 fix broken css module support in prod (#4361) 2018-04-27 08:04:51 +02: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
Andreas Cederström
fb8e78b24f bump lint-staged to node 10 compatible version 2018-04-27 07:51:04 +02:00
Thiago Galvani
789b856b13 documentation: Added License to the README.md (#4294)
* Adding License to the README.md

* Adding new license wording on README

* Update README.md
2018-04-21 16:44:51 -04:00
wtgtybhertgeghgtwtg
66cc7a903e Bump fsevents. (#4331) 2018-04-20 23:51:55 -04:00
Brian Muenzenmeyer
cf6caf46ef Fix typo in e2e-simple.sh comment (#4323) 2018-04-19 14:39:32 -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
Antti Ahti
836bb39394 Fix some typos in README.md (#4286) 2018-04-15 11:59:47 -04:00
Tom Coleman
92b79b3215 Added learnstorybook.com to Storybook links (#4298)
Learnstorybook is a tutorial for Storybook that both uses CRA and is at a level of introductionary detail appropriate for CRA users.
2018-04-15 11:57:11 -04:00
Jerry Muzsik
fc2f63a238 Document multiple build environments via env-cmd #4071 (#4117)
* Docs - Document multiple build environments via

* Docs - Document multiple build environments via

* Docs - Document multiple build environments via

* Docs - Document multiple build environments via env-cmd

* fix - based upon requests

* Update README.md
2018-04-15 11:52:43 -04:00
Francis Upton IV
14f4485aeb Fixed link to CSS imports blog post 2018-04-13 16:06:57 -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
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
Andreas Cederström
06176e1ea4 bump babel 7 beta (#4253) 2018-04-05 07:28:30 +02:00
Andreas Cederström
7966139635 Small typo fix #4217 2018-04-04 08:46:15 +02:00
Joe Haddad
6bf77205ea Changelog for 1.1.4 2018-04-03 20:32:28 -04:00
Joe Haddad
27629245fb Update detect-port-alt 2018-04-03 19:59:36 -04:00
Dan Abramov
90c908e397 Changelog for 1.1.3 2018-04-03 18:45:06 +01:00
Dan Abramov
3b102fe1b9 Work around Jest environment resolving bug (#4247) 2018-04-03 18:44:59 +01:00
Dan Abramov
2e690e98fc Add 1.1.2 changelog (#4242) 2018-04-03 00:53:06 +01:00
Vicente Plata
061d1e46fc Add troubleshooting for Github Pages (#4197)
Add troubleshooting for an issue that has to do with either 2FA, or using Windows, or both, when trying to deploy an app via gh-pages
2018-04-03 00:51:58 +01:00