Configured api and client for production builds

This commit is contained in:
ireic
2020-01-07 21:38:45 +01:00
parent 164cf2b137
commit 10e5696c63
13 changed files with 192 additions and 194 deletions

12
api/tsconfig-paths.js Normal file
View File

@@ -0,0 +1,12 @@
const tsConfigPaths = require('tsconfig-paths');
const tsConfig = require('./tsconfig.json');
// Typescript compiler doesn't rewrite absolute paths back to relative
// when compiling production code to /build. Instead we have to use
// tsconfig-paths to do that job when we run our production start script.
// https://github.com/microsoft/TypeScript/issues/10866
tsConfigPaths.register({
baseUrl: tsConfig.compilerOptions.outDir,
paths: tsConfig.compilerOptions.paths,
});