Skip to content

Instantly share code, notes, and snippets.

@bartholomej
Created October 23, 2020 11:08
Show Gist options
  • Save bartholomej/989b3c07bf49ba3085701f181476fa58 to your computer and use it in GitHub Desktop.
Save bartholomej/989b3c07bf49ba3085701f181476fa58 to your computer and use it in GitHub Desktop.
Angular skip differential loading to speed up build
{
"scripts": {
"differential:disable": "yarn ts-node --project ./build-scripts/tsconfig.ts-node.json ./build-scripts/skip-differential-loading"
}
}
import { writeFileSync } from 'fs';
import { join } from 'path';
import tsConfig from '../tsconfig.json';
const TARGET = 'es5';
const cfg: Record<string, any> = tsConfig;
// Disable differential loading to speed up build
console.log(`${cfg.compilerOptions.target} -> ${TARGET}`);
cfg.compilerOptions.target = TARGET;
writeFileSync(join(__dirname, '..', 'tsconfig.json'), JSON.stringify(cfg, null, 2));
console.log('\x1b[34m', `Differential loading was temporarily disabled`);
{
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["es2020"],
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment