no longer transpile tsx files in backend packages

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-09-22 14:09:19 +02:00
committed by Spencer Henry
parent 383dc6e2fa
commit 2499dcb7b1
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/cli': minor
---
Removed `tsx` and `jsx` as supported extensions in backend packages. For most
repos, this will not have any effect. But if you inadvertently had added some
`tsx`/`jsx` files to your backend package, you may now start to see `code: 'MODULE_NOT_FOUND'` errors when launching the backend locally. The reason for
this is that the offending files get ignored during transpilation. Hence, the
importing file can no longer find anything to import.
The fix is to rename any `.tsx` files in your backend packages to `.ts` instead,
or `.jsx` to `.js`.
+1 -1
View File
@@ -267,7 +267,7 @@ export async function createBackendConfig(
paths.targetRunFile ? paths.targetRunFile : paths.targetEntry,
],
resolve: {
extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx', '.json'],
extensions: ['.ts', '.mjs', '.js', '.json'],
mainFields: ['main'],
modules: [paths.rootNodeModules, ...moduleDirs],
plugins: [