3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 04:25:01 +00:00
zeppelin/backend/register-tsconfig-prod-paths.js
2019-11-08 00:03:02 +02:00

10 lines
324 B
JavaScript

const path = require('path');
const tsconfig = require('./tsconfig.json');
const tsconfigPaths = require('tsconfig-paths');
// E.g. ./dist/backend
const baseUrl = path.resolve(tsconfig.compilerOptions.outDir, path.basename(__dirname));
tsconfigPaths.register({
baseUrl,
paths: tsconfig.compilerOptions.paths || [],
});