backend: remove superfluous file existence check (#774)
Summary: Webpack will fail (quickly) if any required entry points do not exist. The `scripts/backend.js` script superfluously checks this, too. This patch removes that check. Test Plan: In `config/paths.js`, change `src/cli/main.js` to `src/cli/wat.js`. Then, `yarn backend`, and note that Webpack fails quickly, with an error “entry module not found”. Note that Webpack fails equally quickly if you change the path of the last entry point rather than the first one. wchargin-branch: backend-remove-exists-check
This commit is contained in:
parent
3d0f295ba7
commit
c8175b9e3c
|
@ -31,11 +31,6 @@ const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
|
||||||
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
|
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
|
||||||
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
|
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
|
||||||
|
|
||||||
// Warn and crash if required files are missing
|
|
||||||
if (!checkRequiredFiles(Object.values(paths.backendEntryPoints))) {
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
const outputPath = process.argv.some((s) => s === "--dry-run" || s === "-n")
|
const outputPath = process.argv.some((s) => s === "--dry-run" || s === "-n")
|
||||||
? tmp.dirSync({unsafeCleanup: true, prefix: "sourcecred-"}).name
|
? tmp.dirSync({unsafeCleanup: true, prefix: "sourcecred-"}).name
|
||||||
: paths.backendBuild;
|
: paths.backendBuild;
|
||||||
|
|
Loading…
Reference in New Issue