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

Feat/cra update #204

Merged
merged 179 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
6a2a61a
Merge commit 'dc74990b89b5c6e143b522c759be3dac2c286514' into upstream
adammockor Oct 23, 2018
e40a6bc
Merge branch 'master' of github.com:facebook/create-react-app into up…
adammockor Nov 17, 2018
16211f4
Merge remote-tracking branch 'upstream/master' into upstream
adammockor Sep 8, 2019
a825e8f
Publish
iansu Sep 19, 2019
0dc69ec
Update runtime chunk name separator in docs (#7705)
samuelmeuli Sep 19, 2019
05f7924
Remove 'shortcut' link type before 'icon' (#7707)
lewislbr Sep 20, 2019
b1e6155
Guard polyfills against window possibly being undefined (#7205)
jxom Sep 24, 2019
6f5221c
Enable .eslintignore with extend flag (#7562)
igtm Sep 24, 2019
93150c5
Add "entrypoints" key to asset manifest (#7721)
samuelmeuli Sep 24, 2019
0d1775e
Update adding flow documentation (#7731)
FezVrasta Sep 25, 2019
42ee721
set output.globalObject to 'this' (#7742)
Sep 26, 2019
6533a6d
Update logic and log errors for EXTEND_ESLINT (#7530)
n1ru4l Sep 27, 2019
e624b75
update list of supported jest config overrides (#7601)
neilbryson Sep 27, 2019
4a3718b
Upgrade Webpack version (#7740)
RDIL Sep 30, 2019
c0d73ba
Close br tags in template README files (#7668)
rakannimer Sep 30, 2019
fefd716
Fix variable name casing in fileTransform (#7752)
lewislbr Sep 30, 2019
a10223d
Documentation typo fix (#7757)
tomer Sep 30, 2019
6f7b371
Fix linting error when using rest props (#7754)
alexandrtovmach Oct 1, 2019
71946b1
Add TSC_COMPILE_ON_ERROR setting (#6931)
kylebebak Oct 1, 2019
f36d61a
Remove switch case (#7729)
andrelmlins Oct 1, 2019
6980616
docs: note that v2 to v3 migration may require deletion of node_modul…
kimpers Oct 1, 2019
85aac9b
Stop hiding the column number of ESLint errors (#6980)
justingrant Oct 1, 2019
7e2b6b1
Support setting baseUrl to root directory (#7755)
robertvansteen Oct 2, 2019
6b8fa00
Use installing package manager in README (#7687)
ashr81 Oct 2, 2019
a8c379f
Merge remote-tracking branch 'upstream/master' into upstream
adammockor Oct 2, 2019
88cf8cd
Support production profiling with React Developer Tools (#7737)
JacobMGEvans Oct 3, 2019
6a74342
Prepare 3.2.0 release
iansu Oct 3, 2019
7fae307
Publish
iansu Oct 3, 2019
e51ea13
Temporarily disable Windows in CI (#7773)
ianschmitz Oct 3, 2019
ac93f31
Add babel runtime version to transform-runtime plugin to reduce… (#7726)
topaxi Oct 6, 2019
09cbb89
Add Babel sourcemap to resolve VSCode debugging issues (#7022)
justingrant Oct 10, 2019
9161ba8
Fix process type in TypeScript template (#7796)
fuszenecker Oct 10, 2019
f06ae8b
Account for browserslist environment variables (#7764)
Oct 11, 2019
c8ca307
Clarify dynamic import stage in docs (#7813)
aprilandjan Oct 13, 2019
dc4d62d
Update adding-typescript.md (#7815)
orta Oct 14, 2019
ab41c4c
Document how to use the .env file to enforce HTTPS (#7821)
TomasHubelbauer Oct 14, 2019
889df8e
Fix absolute paths issue in Jest (#7822)
robertvansteen Oct 14, 2019
4a4ae1e
Document correct default behavior for HOST var (#7823)
jsejcksn Oct 15, 2019
81c48dc
Fix grammar error in troubleshooting.md (#7824)
jakeboone02 Oct 15, 2019
9243305
Upgrade to docusaurus 2 (#7785)
endiliey Oct 15, 2019
b4068f2
Update doc publishing instructions
iansu Oct 15, 2019
584e352
Revert logo in templates (#7830)
iansu Oct 16, 2019
2da645c
feat: add additional Jest keys to whitelist (#7832)
mrmckeb Oct 16, 2019
ca37609
Link to React documentation for code splitting (#7686)
Hugodby Oct 16, 2019
053f977
Add a note about .eslingignore files being respected (#7809)
seanlaff Oct 16, 2019
4b024e9
added check for typescript template and unsupported node version (#7839)
awaseem Oct 17, 2019
ce968a9
Update getting-started.md (#7841)
reactjser Oct 18, 2019
07470fd
Link to ASP.NET Core docs (#7840)
Daniel15 Oct 19, 2019
da06c23
Update readme gif links (#7849)
cchanxzy Oct 20, 2019
9455ec5
Update adding-bootstrap.md (#7853)
Xuhao Oct 21, 2019
f337acc
Move unused eslint webpack import into @remove-on-eject block (#7856)
mrseanbaines Oct 21, 2019
9d00fce
📖 DOC: Improvement (#7819)
waahab Oct 21, 2019
7690af5
Upgrade terser & enable parallel minification in wsl (#7857)
endiliey Oct 21, 2019
9788522
Add a GitHub Action that runs the build script (#7861)
iansu Oct 22, 2019
42140e5
Edit InterpolateHtmlPlugin hook (#6448) (#6449)
GuiHash Oct 23, 2019
5ea3b34
Fix notations of loopback addresses (#7474)
wataash Oct 23, 2019
ea34c1d
Add Service-Worker header to checkValidServiceWorker (#6753)
darthmaim Oct 23, 2019
a351750
Add additional information for postcss errors (#6282) (#6352)
buildbreakdo Oct 23, 2019
4582491
Fix eslint complaints in build.js (#7870)
andriijas Oct 24, 2019
1d03579
Add Alex to lint documentation (#7852)
iansu Oct 24, 2019
a51729c
Bump docusaurus 🦖 (#7874)
andriijas Oct 24, 2019
c24314d
Dark scheme overlay (#7052)
Fabianopb Oct 24, 2019
7efe29b
Bump react (#7875)
andriijas Oct 24, 2019
f79f303
Bump styling related loaders (#7876)
andriijas Oct 24, 2019
e92db94
Remove alex precommit check (#7878)
iansu Oct 24, 2019
4c0c819
Add template support (#7716)
mrmckeb Oct 24, 2019
facd8f9
Prepare 3.3.0 beta
iansu Oct 24, 2019
3e7391d
If template name already starts with cra-template leave it alone (#7880)
iansu Oct 24, 2019
07ccad7
Update prerelease publishing instructions
iansu Oct 24, 2019
324428f
Upgrade packages and tweak config to adapt to new config format (#7814)
andriijas Oct 25, 2019
971f249
refactor: remove double coerce (#7882)
mrmckeb Oct 27, 2019
c34aa13
Add yarn.lock to .gitignore (#7789)
lukyth Oct 27, 2019
165765d
chore: Fix broken link for CRA deployment (#7897)
haruelrovix Oct 29, 2019
2c45a3c
chore: Fix broken link for e2e README (#7896)
haruelrovix Oct 29, 2019
2de57fe
Add @testing-library to the default templates (#7881)
kentcdodds Oct 29, 2019
b4fe788
Add numeric separator support (#7817)
tharun208 Oct 30, 2019
b68c777
Update open (#7910)
andriijas Oct 31, 2019
6d6dfa9
Mark TypeScript as an optional peer dependency (#7860)
dstaley Oct 31, 2019
9750738
Add restoreMocks to supported jest config keys (#7921)
ianschmitz Nov 3, 2019
d46da89
fix seperators typo (#7932)
donavon Nov 5, 2019
10daea2
No spinning React logo if `prefers-reduced-motion` (#7931)
donavon Nov 6, 2019
0c9fa8d
Made PRs welcome badge point to contributors guide (#7792)
jamesgeorge007 Nov 6, 2019
8a1ee2f
Make JavaScript and TypeScript templates consistent (#7944)
suprj Nov 7, 2019
211694a
Fix CI (#7951)
ianschmitz Nov 9, 2019
d12b4b6
Add optional chaining and nullish coalescing operators support (#7438)
renatoagds Nov 9, 2019
5cdc3cc
Add tests for optional chaining and null coalescing (#7952)
ianschmitz Nov 9, 2019
f01bfac
Upgrade jest-watch-typeahead (#7956)
Andarist Nov 10, 2019
30b491b
Fix light background in docusaurus night mode (#7936)
heyimalex Nov 13, 2019
915108b
Add placeholders where old template READMEs used to be (#7972)
iansu Nov 13, 2019
9df95df
Temporarily disable GitHub Actions (#7978)
iansu Nov 14, 2019
3d6d0a1
Prepare 3.3.0 beta
iansu Nov 14, 2019
58b4738
Bump dependencies (#7986)
ianschmitz Nov 16, 2019
e7cdde6
Support scoped templates (#7991)
klasbj Nov 18, 2019
3aaa3fa
Add contributors section to readme (#7995)
ianschmitz Nov 18, 2019
4b4f3f2
added e2e test for checking typescript template with unsupported node…
awaseem Nov 18, 2019
df5088d
Unpin dependencies in react-app-polyfill (#7999)
ianschmitz Nov 19, 2019
23d5776
Add scripts support to templates (#7989)
mrmckeb Nov 19, 2019
4604c5e
Override no-unused-expressions with the typescript-eslint version (#8…
maxdavidson Nov 20, 2019
5d24a5e
Prefix apple-touch-icon links with PUBLIC_URL. (#8005)
benblank Nov 24, 2019
82009f5
Bump webpack-dev-server (#7988)
ianschmitz Nov 24, 2019
1a66971
Bump dependencies (#8024)
ianschmitz Nov 24, 2019
99d71f3
Re-enable GitHub Actions (#8029)
iansu Nov 25, 2019
821fe6b
Update CHANGELOG
iansu Nov 27, 2019
6a3ccc3
Update CODEOWNERS
iansu Nov 27, 2019
fffc777
Remove no-unexpected-multiline rule (#8039)
iansu Nov 28, 2019
f6ba862
Add TypeScript peer dependency to react-scripts (#8038)
iansu Nov 28, 2019
29c5e55
Update template docs (#8050)
mrmckeb Nov 29, 2019
9654bef
Prepare 3.3.0 release
iansu Dec 4, 2019
0b45600
Update CHANGELOG
iansu Dec 4, 2019
9a817dd
Publish
iansu Dec 5, 2019
9f4cb4f
webpackHotDev now uses wss when https is used (#8079)
mikecaulley Dec 5, 2019
2ace7c2
Add custom-templates to docs sidebar (#8077)
ianschmitz Dec 5, 2019
8330e7c
Fix typo in CHANGELOG.md (#8080)
Trontor Dec 6, 2019
7317251
Merge remote-tracking branch 'upstream/master' into upstream
adammockor Dec 6, 2019
b19bffe
Remove error for @typescript-eslint/no-namespace (#7803)
szhu Dec 6, 2019
0b293e9
Fix CI build (#8122)
ianschmitz Dec 9, 2019
0327d89
Fix CSS font-face minification (#8106)
sidonaldson Dec 9, 2019
53a48c4
Add slashes to WebSocket protocol URL (#8116)
Baael Dec 9, 2019
b8ff97b
Fix typo in comment: `?.` is right, not `.?` (#8124)
vadzim Dec 9, 2019
1f1594d
chore: update docusaurus & tweak site (#8111)
endiliey Dec 10, 2019
8d1a4f2
[Security] Update terser webpack plugin (#8102)
RDIL Dec 11, 2019
ebcffda
Add current version and bin location to --info output (#8168)
heyimalex Dec 13, 2019
9922275
Bump pkgUp (#8163)
andriijas Dec 13, 2019
349a92a
Bump chalk (#8164)
andriijas Dec 13, 2019
ab2976f
Add link to Netlify in README
iansu Dec 13, 2019
f26de73
Bump internal dependencies (#8176)
andriijas Dec 14, 2019
f314855
Add package-runner note to readme (#8132)
JeromeDeLeon Dec 15, 2019
1a13b59
Update PWA docs links to point to template package (#8147)
peet Dec 15, 2019
30eaab4
Minor refactors in create-react-app (#8178)
heyimalex Dec 16, 2019
18e56da
fix: proactively append to .gitignore during init (#8028)
bmuenzenmeyer Dec 18, 2019
88a5435
Bump babel-plugin-tester and fix breaking changes (#8171)
andriijas Dec 19, 2019
3f2037b
Little typo (#8212)
sonyarianto Dec 20, 2019
c03bb36
Replace favicon in templates (#8194)
heyimalex Dec 30, 2019
fa85f03
Support shorthand scoped templates (#8298)
kevin940726 Jan 12, 2020
94932be
Allow additional package keys and add blacklist (#8082) (#8219)
tomvalorsa Jan 12, 2020
f875bb0
Minor grammatical edit (#8293)
egrim Jan 16, 2020
a608c5a
Update Dependencies (#8324)
RDIL Jan 21, 2020
dada035
Remove React.FC from Typescript template (#8177)
Retsam Jan 22, 2020
4bf14fa
Downgrade open from 7.0.0 to 6.4.0 (#8364)
vince1995 Jan 23, 2020
b855da5
Remove outdated babel plugins (#8353)
ianschmitz Jan 30, 2020
ddcb7d5
Add titleProp to SVGR ReactComponent type definition (#8099)
rhnorskov Jan 30, 2020
720d90b
Sync dependencies babel config (#8120)
ianschmitz Jan 30, 2020
cafd602
Update custom template docs with instructions for testing custom temp…
kevinold Jan 30, 2020
ca9c61e
Update setting-up-your-editor.md (#8247)
eip1599 Jan 30, 2020
dd0df73
Remove outdated docs regarding vscode eslint extension and type… (#8307)
john-james-gh Jan 30, 2020
e530598
Fix sass importLoaders (#8281)
mariusc23 Jan 30, 2020
ed162a3
Add "Disallow:" to robots.txt (#8255)
tomoyaf Jan 30, 2020
6ee4e91
Add helpful message to the footer (#6548)
pyrogenic Jan 31, 2020
03018d7
Update docs according to lint-staged v10 (#8394)
lukyth Jan 31, 2020
4da41b4
docs: Add troubleshooting documentation on ENOSPC (#8380)
huchenme Jan 31, 2020
a7b8732
Prepare 3.3.1 release
iansu Jan 31, 2020
d7c6842
Publish
iansu Jan 31, 2020
fb9745e
Make the PWA link point to the right place (#8379)
cassidoo Jan 31, 2020
d9e05f9
Update commit message to use imperative mood (#8377)
crstead Jan 31, 2020
d2de54b
Wider Chromium support for openBrowser (#8367)
Jan 31, 2020
325e599
fix(test): force install npm in e2e-behaviour (#8402)
iamandrewluca Jan 31, 2020
0db04ec
setupTestFrameworkScriptFile is deprecated (#8390)
JimmyLv Jan 31, 2020
1959131
Fix robots.txt for TS (#8403)
Kamahl19 Jan 31, 2020
9233caf
Update public folder usage docs to clarify globals (#8299)
keevan Jan 31, 2020
84d8b14
Run git init before template dependencies are installed (#8282)
lukaszfiszer Jan 31, 2020
cc985d0
Support JetBrains Rider IDE as an editor (#7948)
djpowell Jan 31, 2020
822422c
Enable custom sockjs pathname for hot reloading server. (#7750)
heygrady Jan 31, 2020
0299c0e
Add option to provide custom ssl certificates during development (#5845)
alexbrazier Jan 31, 2020
3190e4f
Handle service worker error in Firefox (#8272)
rosinghal Jan 31, 2020
1cbc6f7
feat(react-scripts): allow PUBLIC_URL in develoment mode (#7259)
iamandrewluca Feb 2, 2020
687c4eb
Change arrow functions to function declarations (#8412)
lewislbr Feb 3, 2020
cd2469e
Fix navbar line break in header (#8437)
esvyridov Feb 6, 2020
767aa18
Fixes unchecked access to 'deploy' script on build (#8292)
renato-bohler Feb 8, 2020
eb8e7be
Downgrade chalk for ie 11 support (#8439)
ianschmitz Feb 8, 2020
d45823c
fix(react-scripts): do not redirect served path if request may proxy …
iamandrewluca Feb 8, 2020
865ea05
fix(typescriptFormatter): use chalk@2 constructor (#8450)
iamandrewluca Feb 10, 2020
589b41a
update open to v7.0.2 (#8459)
vince1995 Feb 11, 2020
4784997
Correct webpack name casing (#8475)
lewislbr Feb 13, 2020
e579de1
Downgrade style-loader to v0.23.1 due to CSS modules hot reload… (#8378)
chybisov Feb 14, 2020
5ccee88
Prepare 3.4.0 release
iansu Feb 14, 2020
8b0dd54
Publish
iansu Feb 14, 2020
de6bc2f
Merge branch 'upstream' of https://github.com/lightingbeetle/lighter …
adammockor Feb 19, 2020
8f5d5e3
Merge branch 'upstream' into feat/cra-update
adammockor Feb 19, 2020
5efddd8
fix missing packages in react-scripts
adammockor Feb 19, 2020
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
8 changes: 4 additions & 4 deletions CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ yarn add --exact react-scripts@1.1.1
- [#3757](https://github.com/facebook/create-react-app/pull/3757) Try updating Flow. ([@gaearon](https://github.com/gaearon))
- [#3414](https://github.com/facebook/create-react-app/pull/3414) Export `dismissRuntimeErrors` function. ([@skidding](https://github.com/skidding))
- [#3036](https://github.com/facebook/create-react-app/pull/3036) Cleaning up `printHostingInstructions` a bit. ([@GreenGremlin](https://github.com/GreenGremlin))
- [#3514](https://github.com/facebook/create-react-app/pull/3514) Fix `FileSizeReporter` for multi build Webpack setups. ([@iiska](https://github.com/iiska))
- [#3514](https://github.com/facebook/create-react-app/pull/3514) Fix `FileSizeReporter` for multi build webpack setups. ([@iiska](https://github.com/iiska))
- [#3362](https://github.com/facebook/create-react-app/pull/3362) Refactor extra watch options regex to `react-dev-utils`. ([@xjlim](https://github.com/xjlim))

#### Committers: 47
Expand Down Expand Up @@ -1104,7 +1104,7 @@ or
yarn add --dev --exact react-scripts@1.0.8
```

**If you previously used `HTTPS=true` environment variable in development**, make sure you aren't affected by a now-fixed vulnerability in Webpack by [visiting this page](http://badcert.mike.works/). You can read more about the vulnerability [here](https://medium.com/@mikenorth/webpack-preact-cli-vulnerability-961572624c54).
**If you previously used `HTTPS=true` environment variable in development**, make sure you aren't affected by a now-fixed vulnerability in webpack by [visiting this page](http://badcert.mike.works/). You can read more about the vulnerability [here](https://medium.com/@mikenorth/webpack-preact-cli-vulnerability-961572624c54).

You may optionally then move `react-scripts` from `devDependencies` to `dependencies` since that’s how we’ll structure newly created projects. It is not necessary though.

Expand Down Expand Up @@ -1724,7 +1724,7 @@ Please [file an issue](https://github.com/facebook/create-react-app/issues/new)
- `react-dev-utils`
- [#2125](https://github.com/facebook/create-react-app/pull/2125) Only show the first compilation error. ([@gaearon](https://github.com/gaearon))
- [#2120](https://github.com/facebook/create-react-app/pull/2120) Omit ESLint warnings when there are ESLint errors. ([@gaearon](https://github.com/gaearon))
- [#2113](https://github.com/facebook/create-react-app/pull/2113) Prettify errors and warnings for Webpack 2. ([@gaearon](https://github.com/gaearon))
- [#2113](https://github.com/facebook/create-react-app/pull/2113) Prettify errors and warnings for webpack 2. ([@gaearon](https://github.com/gaearon))
- [#1842](https://github.com/facebook/create-react-app/pull/1842) Modularize and extract crash overlay to iframe. ([@Timer](https://github.com/Timer))
- `create-react-app`
- [#1811](https://github.com/facebook/create-react-app/pull/1811) Allow creation of apps in empty Mercurial repos. ([@GreenGremlin](https://github.com/GreenGremlin))
Expand Down Expand Up @@ -1770,7 +1770,7 @@ Please [file an issue](https://github.com/facebook/create-react-app/issues/new)
- [#1736](https://github.com/facebook/create-react-app/pull/1736) Fix eject for linked react-scripts. ([@tuchk4](https://github.com/tuchk4))
- [#1741](https://github.com/facebook/create-react-app/pull/1741) Fix internal linting setup. ([@gaearon](https://github.com/gaearon))
- [#1730](https://github.com/facebook/create-react-app/pull/1730) Fix Node 4 e2e tests. ([@Timer](https://github.com/Timer))
- [#1715](https://github.com/facebook/create-react-app/pull/1715) Remove unused `url` import in Webpack config. ([@pd4d10](https://github.com/pd4d10))
- [#1715](https://github.com/facebook/create-react-app/pull/1715) Remove unused `url` import in webpack config. ([@pd4d10](https://github.com/pd4d10))
- [#1700](https://github.com/facebook/create-react-app/pull/1700) Update extract-text-webpack-plugin to stable. ([@SimenB](https://github.com/SimenB))
- `react-dev-utils`, `react-scripts`
- [#2209](https://github.com/facebook/create-react-app/pull/2209) Move more logic from react-scripts to react-dev-utils. ([@gaearon](https://github.com/gaearon))
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ You can read more about [these polyfills here](https://github.com/facebook/creat

### Dynamic `import()` of a CommonJS module now has a `.default` property

[Webpack 4 changed the behavior of `import()`](https://medium.com/webpack/webpack-4-import-and-commonjs-d619d626b655) to be closer in line with the specification.
[webpack 4 changed the behavior of `import()`](https://medium.com/webpack/webpack-4-import-and-commonjs-d619d626b655) to be closer in line with the specification.

Previously, importing a CommonJS module did not require you specify the default export. In most cases, this is now required.
If you see errors in your application about `... is not a function`, you likely need to update your dynamic import, e.g.:
Expand Down Expand Up @@ -973,7 +973,7 @@ If you used 2.x alphas, please [follow these instructions](https://gist.github.c
- `react-scripts`
- [#5218](https://github.com/facebook/create-react-app/pull/5218) Support globalSetup and globalTeardown Jest options ([@gaearon](https://github.com/gaearon))
- [#5073](https://github.com/facebook/create-react-app/pull/5073) Add user defined proxy via middleware ([@Timer](https://github.com/Timer))
- [#3945](https://github.com/facebook/create-react-app/pull/3945) Allow bundles to be analyzed with Webpack-specific tools ([@joshwcomeau](https://github.com/joshwcomeau))
- [#3945](https://github.com/facebook/create-react-app/pull/3945) Allow bundles to be analyzed with webpack-specific tools ([@joshwcomeau](https://github.com/joshwcomeau))
- [#4195](https://github.com/facebook/create-react-app/pull/4195) Sass loader ([@Fabianopb](https://github.com/Fabianopb))
- [#3909](https://github.com/facebook/create-react-app/pull/3909) Add loader for .graphql files ([@petetnt](https://github.com/petetnt))
- [#1288](https://github.com/facebook/create-react-app/pull/1288) Create git repository with initial commit ([@mauricedb](https://github.com/mauricedb))
Expand All @@ -988,7 +988,7 @@ If you used 2.x alphas, please [follow these instructions](https://gist.github.c
- [#3865](https://github.com/facebook/create-react-app/pull/3865) Add opt-out for preset-flow to work with @babel/preset-typescript ([@oieduardorabelo](https://github.com/oieduardorabelo))
- [#3675](https://github.com/facebook/create-react-app/pull/3675) add experimental babel-plugin-macros support ([@kentcdodds](https://github.com/kentcdodds))
- `babel-preset-react-app`, `confusing-browser-globals`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- [#4077](https://github.com/facebook/create-react-app/pull/4077) Webpack 4 ([@andriijas](https://github.com/andriijas))
- [#4077](https://github.com/facebook/create-react-app/pull/4077) webpack 4 ([@andriijas](https://github.com/andriijas))
- `create-react-app`
- [#4350](https://github.com/facebook/create-react-app/pull/4350) Support package distribution tags ([@miraage](https://github.com/miraage))
- `babel-preset-react-app`, `react-scripts`
Expand Down Expand Up @@ -1125,7 +1125,7 @@ If you used 2.x alphas, please [follow these instructions](https://gist.github.c
- [#4846](https://github.com/facebook/create-react-app/pull/4846) Update jest version ([@skoging](https://github.com/skoging))
- [#4362](https://github.com/facebook/create-react-app/pull/4362) Bumped jest version to 22.4.1 ([@CGreenburg](https://github.com/CGreenburg))
- `babel-preset-react-app`, `confusing-browser-globals`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- [#4077](https://github.com/facebook/create-react-app/pull/4077) Webpack 4 ([@andriijas](https://github.com/andriijas))
- [#4077](https://github.com/facebook/create-react-app/pull/4077) webpack 4 ([@andriijas](https://github.com/andriijas))
- `babel-preset-react-app`
- [#4432](https://github.com/facebook/create-react-app/pull/4432) Update babel-plugin-macros to fix a bug ([@stereobooster](https://github.com/stereobooster))
- [#3818](https://github.com/facebook/create-react-app/pull/3818) Remove PropTypes from production build (#209) ([@iansu](https://github.com/iansu))
Expand Down
8 changes: 4 additions & 4 deletions docusaurus/docs/adding-a-stylesheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Adding a Stylesheet
sidebar_label: Adding Stylesheets
---

This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:
This project setup uses [webpack](https://webpack.js.org/) for handling all assets. webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:

## `Button.css`

Expand All @@ -18,7 +18,7 @@ This project setup uses [Webpack](https://webpack.js.org/) for handling all asse

```js
import React, { Component } from 'react';
import './Button.css'; // Tell Webpack that Button.js uses these styles
import './Button.css'; // Tell webpack that Button.js uses these styles

class Button extends Component {
render() {
Expand All @@ -28,8 +28,8 @@ class Button extends Component {
}
```

**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-blog/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack.
**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-blog/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than webpack.

In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output.

If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool.
If you are concerned about using webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool.
27 changes: 15 additions & 12 deletions docusaurus/docs/adding-images-fonts-and-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ id: adding-images-fonts-and-files
title: Adding Images, Fonts, and Files
---

With Webpack, using static assets like images and fonts works similarly to CSS.
With webpack, using static assets like images and fonts works similarly to CSS.

You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF.
You can **`import` a file right in a JavaScript module**. This tells webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF.

To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebook/create-react-app/issues/1153). You can control the 10,000 byte threshold by setting the `IMAGE_INLINE_SIZE_LIMIT` environment variable as documented in our [advanced configuration](advanced-configuration.md).

Here is an example:

```js
import React from 'react';
import logo from './logo.png'; // Tell Webpack this JS file uses this image
import logo from './logo.png'; // Tell webpack this JS file uses this image

console.log(logo); // /logo.84287d09.png

Expand All @@ -25,7 +25,7 @@ function Header() {
export default Header;
```

This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths.
This ensures that when the project is built, webpack will correctly move the images into the build folder, and provide us with correct paths.

This works in CSS too:

Expand All @@ -35,9 +35,9 @@ This works in CSS too:
}
```

Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets.
webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by webpack from content hashes. If the file content changes in the future, webpack will give it a different name in production so you don’t need to worry about long-term caching of assets.

Please be advised that this is also a custom feature of Webpack.
Please be advised that this is also a custom feature of webpack.

**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).

Expand All @@ -51,12 +51,15 @@ One way to add SVG files was described in the section above. You can also import

```js
import { ReactComponent as Logo } from './logo.svg';
const App = () => (
<div>
{/* Logo is an actual React component */}
<Logo />
</div>
);

function App() {
return (
<div>
{/* Logo is an actual React component */}
<Logo />
</div>
);
}
```

This is handy if you don't want to load SVG as a separate file. Don't forget the curly braces in the import! The `ReactComponent` import name is significant and tells Create React App that you want a React component that renders an SVG, rather than its filename.
Expand Down
Loading