From 6d1bf0d50aa1a71bbb4fb51c477aed969614a0cd Mon Sep 17 00:00:00 2001 From: Josh Dover Date: Wed, 6 Mar 2019 16:54:45 -0600 Subject: [PATCH] Compile server TypeScript code before browser --- src/dev/build/tasks/transpile_typescript_task.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dev/build/tasks/transpile_typescript_task.js b/src/dev/build/tasks/transpile_typescript_task.js index 4d5f9e7c8982a..a3be2e1d0c2ec 100644 --- a/src/dev/build/tasks/transpile_typescript_task.js +++ b/src/dev/build/tasks/transpile_typescript_task.js @@ -54,8 +54,11 @@ export const TranspileTypescriptTask = { const projects = [ typesProjectRepo.tsConfigPath, typesProjectBuild.tsConfigPath, + // Browser needs to be compiled before server code so that any shared code + // is compiled to the lowest common denominator (server's CommonJS format) + // which can be supported by both environments. + browserProject.tsConfigPath, defaultProject.tsConfigPath, - browserProject.tsConfigPath ]; // compile each typescript config file