Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Use the TypeScript compiler for builds #197

Merged
merged 1 commit into from
Aug 4, 2020
Merged

Conversation

jonkoops
Copy link
Owner

@jonkoops jonkoops commented Aug 3, 2020

  • Remove Rollup from the build system and use the TypeScript compiler instead
  • Add the 'module' field to package.json for ESM bundling
  • Some related config file cleanup

Closes #184

- Remove Rollup from the build system and use the TypeScript compiler instead
- Add the 'module' field to package.json for ESM bundling
- Some related config file cleanup
@jonkoops jonkoops requested a review from chrisvanmook August 3, 2020 16:21
@jonkoops jonkoops self-assigned this Aug 3, 2020
@jonkoops jonkoops added the enhancement New feature or request label Aug 3, 2020
@jonkoops jonkoops added this to the 0.2.0 milestone Aug 3, 2020
@piotr-cz
Copy link
Contributor

piotr-cz commented Aug 4, 2020

I'd just suggest specifying types is package.json instead of exporting it.
What is the benefit of exporting undefined value from compiled library?

{
  "main": "lib/index.js",
  "module": "es/index.js",
  "types": "lib/types.ts"
}

@jonkoops
Copy link
Owner Author

jonkoops commented Aug 4, 2020

I'd just suggest specifying types is package.json instead of exporting it.
What is the benefit of exporting undefined value from compiled library?

{
  "main": "lib/index.js",
  "module": "es/index.js",
  "types": "lib/types.ts"
}

I am actually curious if we really need to add a types entry to out package file, to my knowledge the TypeScript compiler is smart enough to find the correct file that already exists.

As for the root export { types } I agree this makes no sense. It is however out of scope for this PR to fix this so I have created a new issue (#200).

@jonkoops jonkoops merged commit 846bcea into master Aug 4, 2020
@jonkoops jonkoops deleted the feature/tsc-builds branch August 4, 2020 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Rollup with the TypeScript compiler
3 participants