mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-06 20:46:44 +08:00
Add react-error-overlay package (#2111)
* ༼ つ ◕_◕ ༽つ stack-frame-overlay * Fix linting * Remove auto overlay * Fix e2e * Pull in the rest * Appease flow * Correct dep * Remove old repo references * Check flow on test * Test overlay in e2e * Add cross env * Rename package * Make sure it gets built post-install * Update the README * Remove extra builds now that there's a postinstall script * Revert "Remove extra builds now that there's a postinstall script" This reverts commit 8bf601dbd36c1e0da7f785fa9ade70ab08ed8772. * Remove broken script * Fix some dev ergo
This commit is contained in:
10
packages/react-error-overlay/src/utils/isInternalFile.js
vendored
Normal file
10
packages/react-error-overlay/src/utils/isInternalFile.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/* @flow */
|
||||
function isInternalFile(url: string, sourceFileName: string | null | void) {
|
||||
return url.indexOf('/~/') !== -1 ||
|
||||
url.indexOf('/node_modules/') !== -1 ||
|
||||
url.trim().indexOf(' ') !== -1 ||
|
||||
sourceFileName == null ||
|
||||
sourceFileName.length === 0;
|
||||
}
|
||||
|
||||
export { isInternalFile };
|
||||
Reference in New Issue
Block a user