ipfs / ipfs/aegir

Cannot build esm for a full Typescript repo

Open
#917 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
105
Forks
62
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.