astagi / workerloader-jest-transformer

🃏 Jest transformer for Webpack worker-loader
MIT License
15 stars 3 forks source link

Cannot import TypeScript files in worker script #9

Open visvirial opened 3 years ago

visvirial commented 3 years ago

This test should pass: https://github.com/visvirial/workerloader-jest-transformer/blob/import-ts-in-worker/__test__/import_ts_in_worker_ts.worker.ts but actually it fails with

    SyntaxError: /../__test__/import_ts_in_worker_ts.lib.ts: Unexpected token, expected ","
      1 |
    > 2 | export const echoback = (msg: string): string => {
        |                             ^
      3 |   return msg;
      4 | };
      5 |

cf. https://github.com/astagi/workerloader-jest-transformer/pull/4