From b0c2a8e0814fca9d7ca69f9521c36844a7c657f5 Mon Sep 17 00:00:00 2001 From: MrOrz Date: Wed, 3 May 2023 18:13:44 +0800 Subject: [PATCH] fix(babel.config.js): let babel module-resolver recognize ts file - Without this fix, import to ts file in in `webhook/handlers/initState` will not be transformed into relative path by module-resolver --- babel.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/babel.config.js b/babel.config.js index 85c1d8b2..9c1779d6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -16,7 +16,13 @@ module.exports = { ], plugins: [ ['ttag', { resolve: { translations: `i18n/${locale}.po` } }], - ['module-resolver', { root: ['./'] }], + [ + 'module-resolver', + { + root: ['./'], + extensions: ['.js', '.ts'], + }, + ], '@babel/plugin-proposal-class-properties', ], };