-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Make error overlay filename configurable #3028
Make error overlay filename configurable #3028
Conversation
@@ -55,7 +56,7 @@ export function startReportingRuntimeErrors(options: RuntimeReportingOptions) { | |||
} finally { | |||
handleRuntimeError(errorRecord); | |||
} | |||
}); | |||
}, options.filename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep backward compat for a bit, can you add a fallback here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be good but worth verifying before merge.
@@ -33,6 +33,7 @@ ErrorOverlay.startReportingRuntimeErrors({ | |||
module.hot.decline(); | |||
} | |||
}, | |||
filename: 'static/js/bundle.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is missing a slash (still works but I'll fix it).
## 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 react-scripts@1.0.13 ``` or ``` yarn add --exact react-scripts@1.0.13 ``` ## 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 react-scripts@1.0.12 ``` or ``` yarn add --exact react-scripts@1.0.12 ``` **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.
* Make error overlay file configurable * Add fallback filename
* Make error overlay file configurable * Add fallback filename
…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)
* Make error overlay file configurable * Add fallback filename
* Make error overlay file configurable * Add fallback filename
* Make error overlay file configurable * Add fallback filename
* Make error overlay file configurable * Add fallback filename
Related to #2515 .
This makes the filename that
react-error-overlay
listens to configurable making it more modular and easy to integrate outside of CRA.