ipfs/aegir

Cannot build esm for a full Typescript repo

tchardin opened this issue · 0 comments

Describe the bug
When all files are *.ts including index.ts, building esm distribution with the "type": "module" config fails.

To Reproduce

  • Entry point of the module should be src/index.ts
  • Set "main": "src/index.ts" in package.json
  • Set "type": "module" in package.json
  • Any import including with *.js endings will break as it seems .ts files are not processed.

Expected behavior
Typescript files should get parsed and esm files should get exported on top of minified build.

Desktop (please complete the following information):

  • OS: MacOS 10.15.6
  • Version ^36.0.2

Additional context
Maybe using esbuild with format: 'esm' in addition to 'iife' build would be easiest.