diff --git a/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts b/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts index b678201d8..1064a7c17 100644 --- a/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts +++ b/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts @@ -50,7 +50,7 @@ export const pluginLinguiMacro = (options: { ], }) - return { contents: result.code, loader: "jsx" } + return { contents: result.code, loader: "tsx" } }) }, }) diff --git a/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts b/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts index 7a39f67bf..8ddf8db66 100644 --- a/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts +++ b/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts @@ -1,6 +1,10 @@ import { t } from "@lingui/core/macro" import { RED } from "../constants" -const msg = t`index page message` +const msg: string = t`index page message` console.log(msg) console.log(RED) + +function test(input: string): void { + console.log("Should support TS type annotation syntax") +}