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

Strip hash from chunk file name #3049

Merged
merged 1 commit into from
Sep 1, 2017
Merged

Conversation

esturcke
Copy link
Contributor

@esturcke esturcke commented Sep 1, 2017

Fix

This fixes bug #3048 and strips hashes from chunks correctly.

Testing

  1. npm run create-react-app test-fix
  2. cd test-fix
  3. Copied src/App.js and src/content.js from cra-chunk-bundle-diff-bug repo
  4. yarn build
...
File sizes after gzip:

  48.61 KB  build/static/js/main.b6cc0832.js
  288 B     build/static/css/main.cacbacc7.css
  177 B     build/static/js/content.4f2061bf.chunk.js
...
  1. Edit src/content.js
  2. yarn build
...
File sizes after gzip:

  48.61 KB (-1 B)  build/static/js/main.b3f3c0af.js
  288 B            build/static/css/main.cacbacc7.css
  180 B (+3 B)     build/static/js/content.c58cbe0c.chunk.js
...

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@gaearon gaearon added this to the 1.0.13 milestone Sep 1, 2017
@gaearon
Copy link
Contributor

gaearon commented Sep 1, 2017

I think this is good, thanks!

@gaearon gaearon merged commit 270b1dc into facebook:master Sep 1, 2017
gaearon added a commit that referenced this pull request Sep 2, 2017
## 1.0.13 (September 2, 2017)

#### 🐛 Bug Fix

* `react-error-overlay`

  * [#3051](#3051) Fix case-sensitivity issue with upgrading the package version. ([@tharakawj](https://github.com/tharakawj))

* `react-dev-utils`

  * [#3049](#3049) Print filesize difference for chunks. ([@esturcke](https://github.com/esturcke))

* `react-scripts`

  * [#3046](#3046) Fix crash in development mode on IE11. ([@tharakawj](https://github.com/tharakawj))

#### 💅 Enhancement

* `react-scripts`

  * [#3033](#3033) Add an empty mock for `child_process` to let some libraries compile. ([@McFlurriez](https://github.com/McFlurriez))

#### 🏠 Internal

* `react-dev-utils`, `react-error-overlay`

  * [#3028](#3028) Make error overlay filename configurable. ([@jaredpalmer](https://github.com/jaredpalmer))

#### Committers: 4

- Anthony ([McFlurriez](https://github.com/McFlurriez))
- Erik J. Sturcke ([esturcke](https://github.com/esturcke))
- Jared Palmer ([jaredpalmer](https://github.com/jaredpalmer))
- Tharaka Wijebandara ([tharakawj](https://github.com/tharakawj))

### Migrating from 1.0.12 to 1.0.13

Inside any created project that has not been ejected, run:

```
npm install --save --save-exact [email protected]
```

or

```
yarn add --exact [email protected]
```

## 1.0.12 (August 28, 2017)

#### 🐛 Bug Fix

* `react-error-overlay`
  * [#3012](#3012) Fix module function name in error overlay. ([@gaearon](https://github.com/gaearon))

* `react-dev-utils`
  * [#2938](#2938) Remove superfluous lodash usage. ([@Timer](https://github.com/Timer))

#### 💅 Enhancement

* `react-scripts`

  * [#2917](#2917) Optimize the size of default favicon. ([@sylvainbaronnet](https://github.com/sylvainbaronnet))

#### 📝 Documentation

* `react-scripts`

  * [#2986](#2986) Docs: debugging in WebStorm. ([@prigara](https://github.com/prigara))
  * [#2948](#2948) Remove Modulus from user guide. ([@Zertz](https://github.com/Zertz))
  * [#2927](#2927) Update README.md. ([@tbassetto](https://github.com/tbassetto))

* `react-dev-utils`

  * [#2942](#2942) Fix docs for `printFileSizesAfterBuild`. ([@Kerumen](https://github.com/Kerumen))

#### 🏠 Internal

* `react-error-overlay`, `react-scripts`

  * [#2991](#2991) Update `babel-runtime` dependency ([@christophehurpeau](https://github.com/christophehurpeau))

* `react-dev-utils`, `react-error-overlay`, `react-scripts`

  * [#2515](#2515) Convert `react-error-overlay` to React ([@tharakawj](https://github.com/tharakawj))

#### Committers: 9

- Christophe Hurpeau ([christophehurpeau](https://github.com/christophehurpeau))
- Dan Abramov ([gaearon](https://github.com/gaearon))
- Ekaterina Prigara ([prigara](https://github.com/prigara))
- Joe Haddad ([Timer](https://github.com/Timer))
- Pier-Luc Gendreau ([Zertz](https://github.com/Zertz))
- Sylvain Baronnet ([sylvainbaronnet](https://github.com/sylvainbaronnet))
- Tharaka Wijebandara ([tharakawj](https://github.com/tharakawj))
- Thomas Bassetto ([tbassetto](https://github.com/tbassetto))
- Yann Pringault ([Kerumen](https://github.com/Kerumen))

### Migrating from 1.0.11 to 1.0.12

Inside any created project that has not been ejected, run:

```
npm install --save --save-exact [email protected]
```

or

```
yarn add --exact [email protected]
```

**Note:** there’s a [known issue](#3041) that might cause the project to not compile after upgrading. In this case, migrate straight to `1.0.13` which doesn’t have this issue.
morgs32 pushed a commit to BrickworkSoftware/create-react-app that referenced this pull request Sep 5, 2017
JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Sep 9, 2017
matart15 pushed a commit to matart15/create-react-app that referenced this pull request Sep 13, 2017
…react-app

* 'master' of https://github.com/facebookincubator/create-react-app:
  Resolved issue facebook#2971 (facebook#2989)
  Revert "run npm 5.4.0 in CI (facebook#3026)" (facebook#3107)
  Updated react-error-overlay to latest Flow (0.54.0) (facebook#3065)
  Auto-detect running editor on Linux for error overlay (facebook#3077)
  Clean target directory before compiling overlay (facebook#3102)
  Rerun prettier and pin version (facebook#3058)
  Reload the page when an error has occurred (facebook#3098)
  run npm 5.4.0 in CI (facebook#3026)
  Unmapper Windows compatibility (facebook#3079)
  Update eslint-config npm install command (facebook#3072)
  Set travis config to use 'precise' ci environment
  Publish
  Changelog for 1.0.13
  Add missing slash
  Make error overlay filename configurable (facebook#3028)
  provide empty mock for child_process so importing libraries with it works (facebook#3033)
  Rename Overlay to ErrorOvelay (facebook#3051)
  Strip hash from chunk file name (facebook#3049)
  Fix error overlay 'Object.assign' issue in IE by including polyfills before webpack client (facebook#3046)
thongdong7 pushed a commit to thongdong7/create-react-app that referenced this pull request Sep 24, 2017
thongdong7 pushed a commit to thongdong7/create-react-app that referenced this pull request Sep 24, 2017
kasperpeulen pushed a commit to kasperpeulen/create-react-app that referenced this pull request Sep 24, 2017
swengorschewski referenced this pull request in swengorschewski/cra-typescript-electron Oct 16, 2017
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants