packages/cli: use separate tsconfig for builds to get currect config in tests

This commit is contained in:
Patrik Oldsberg
2020-04-18 14:47:46 +02:00
parent fe5844038e
commit 7584350834
4 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ if (!isLocal || process.env.BACKSTAGE_E2E_CLI_TEST) {
const cleanupPaths = require('tsconfig-paths').register({ baseUrl, paths });
require('ts-node').register({
project: path.resolve(__dirname, '../tsconfig.json'),
project: path.resolve(__dirname, '../tsconfig.build.json'),
compilerOptions: {
module: 'CommonJS',
},
+1 -1
View File
@@ -18,7 +18,7 @@
"license": "Apache-2.0",
"main": "dist",
"scripts": {
"build": "backstage-cli build-cache -- tsc",
"build": "backstage-cli build-cache -- tsc --project tsconfig.build.json",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"test:e2e": "node e2e-test/cli-e2e-test.js",
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"exclude": ["**/*.test.*"],
"compilerOptions": {
"outFile": "dist/index.js",
"module": "amd"
}
}
-3
View File
@@ -1,10 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": ["src"],
"exclude": ["**/*.test.*"],
"compilerOptions": {
"outFile": "dist/index.js",
"module": "amd",
"baseUrl": "src"
}
}