فهرست منبع

update tsconfig.json

Yuki Takei 5 سال پیش
والد
کامیت
801ae6b49f

+ 3 - 2
packages/growi-bot-proxy/package.json

@@ -7,7 +7,7 @@
     "tsc": "tsc --project tsconfig.compile.json",
     "tsc": "tsc --project tsconfig.compile.json",
     "tsc:w": "tsc --project tsconfig.json -w",
     "tsc:w": "tsc --project tsconfig.json -w",
     "dev:ci": "yarn dev --ci",
     "dev:ci": "yarn dev --ci",
-    "dev": "ts-node-dev src/index.ts",
+    "dev": "ts-node-dev -r tsconfig-paths/register src/index.ts",
     "start:prod:ci": "yarn start:prod --ci",
     "start:prod:ci": "yarn start:prod --ci",
     "start:prod": "cross-env NODE_ENV=production node dist/index.js",
     "start:prod": "cross-env NODE_ENV=production node dist/index.js",
     "test": "yarn test:lint && yarn test:coverage",
     "test": "yarn test:lint && yarn test:coverage",
@@ -21,7 +21,8 @@
     "@tsed/di": "^6.34.3",
     "@tsed/di": "^6.34.3",
     "@tsed/platform-express": "^6.34.3",
     "@tsed/platform-express": "^6.34.3",
     "@tsed/swagger": "^6.34.3",
     "@tsed/swagger": "^6.34.3",
-    "compression": "^1.7.4"
+    "compression": "^1.7.4",
+    "tsconfig-paths": "^3.9.0"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@tsed/core": "^6.34.3",
     "@tsed/core": "^6.34.3",

+ 1 - 1
packages/growi-bot-proxy/src/index.ts

@@ -1,7 +1,7 @@
 import { $log } from '@tsed/common';
 import { $log } from '@tsed/common';
 import { PlatformExpress } from '@tsed/platform-express';
 import { PlatformExpress } from '@tsed/platform-express';
 
 
-import helpers from '^/../../src/lib/util/helpers';
+import helpers from '^/src/lib/util/helpers';
 
 
 import { Server } from './Server';
 import { Server } from './Server';
 
 

+ 0 - 1
packages/growi-bot-proxy/tsconfig.compile.json

@@ -3,7 +3,6 @@
   "compilerOptions": {
   "compilerOptions": {
     "baseUrl": ".",
     "baseUrl": ".",
     "outDir": "./dist",
     "outDir": "./dist",
-    "moduleResolution": "node",
     "declaration": true,
     "declaration": true,
     "noResolve": false,
     "noResolve": false,
     "preserveConstEnums": true,
     "preserveConstEnums": true,

+ 2 - 1
packages/growi-bot-proxy/tsconfig.json

@@ -19,10 +19,11 @@
     "noUnusedParameters": false,
     "noUnusedParameters": false,
 
 
     /* Module Resolution Options */
     /* Module Resolution Options */
+    "moduleResolution": "node",
     "baseUrl": ".",
     "baseUrl": ".",
     "paths": {
     "paths": {
       "~/*": ["src/*"],
       "~/*": ["src/*"],
-      "^/*": ["./*"],
+      "^/*": ["../../*"],
     },
     },
     "typeRoots": [
     "typeRoots": [
       "../../node_modules/@types",
       "../../node_modules/@types",