Skip to content

Commit

Permalink
feat(scripts): improve performance of build time
Browse files Browse the repository at this point in the history
1. Use ts incremental API for fork-ts-checker.
2. Use cheaper source map during dev.

See #473
  • Loading branch information
swashata committed Apr 28, 2019
1 parent 751c4d6 commit 0ddd9a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/scripts/src/bin/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export function serve(options: ProgramOptions | undefined): void {
printSuccessfullyCompiledMessage();
},
onError: msg => {
console.log('');
console.log(`${chalk.bgRed.black(' ERROR ')} please review`);
console.log('');
msg.errors.forEach(e => console.log(e));
Expand All @@ -106,6 +107,7 @@ export function serve(options: ProgramOptions | undefined): void {
console.log('');

if (stats.hasErrors()) {
console.log('');
console.log(
`${chalk.bgRed.black(' ERROR ')} please review`
);
Expand Down
3 changes: 1 addition & 2 deletions packages/scripts/src/config/WebpackConfigHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ export class WebpackConfigHelper {
formatterOptions: {
highlightCode: true,
},
useTypescriptIncrementalApi: false,
reportFiles: this.file.typeWatchFiles
? this.file.typeWatchFiles
: [],
Expand Down Expand Up @@ -631,7 +630,7 @@ ${bannerConfig.copyrightText}${bannerConfig.credit ? creditNote : ''}`,
public getCommon(): CommonWebpackConfig {
return {
context: this.cwd,
devtool: this.isDev ? 'inline-source-map' : 'source-map',
devtool: this.isDev ? 'cheap-module-eval-source-map' : 'source-map',
target: 'web',
watch: this.isDev,
mode: this.env,
Expand Down

0 comments on commit 0ddd9a3

Please sign in to comment.