Skip to content

Commit

Permalink
fix(babel.config.js): let babel module-resolver recognize ts file
Browse files Browse the repository at this point in the history
- Without this fix, import to ts file in in `webhook/handlers/initState` will not be transformed into relative path by module-resolver
  • Loading branch information
MrOrz committed May 3, 2023
1 parent 3a68460 commit b0c2a8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
};

0 comments on commit b0c2a8e

Please sign in to comment.