Skip to content

fix: configure package to output correct ESM#40

Open
WoodyWoodsta wants to merge 3 commits intoopenai:mainfrom
WoodyWoodsta:fix/esm
Open

fix: configure package to output correct ESM#40
WoodyWoodsta wants to merge 3 commits intoopenai:mainfrom
WoodyWoodsta:fix/esm

Conversation

@WoodyWoodsta
Copy link
Copy Markdown

Fixes #39

  • Uses tsdown for transpilation, as well as CSS build
    • Removes the separate build of CSS, since tsdown processes the CSS already.
    • A side-effect is that now css classes are scoped correctly, removing the need for consumers to adopt a modules pre-processor in order to scope css correctly.
  • Fixes package.json references in exports
  • Removes needless type vs es directory separation

tsdown was chosen because it aligns with general Vite usage throughout the project. It means that relative imports can remain without file extensions (i.e. "moduleResolution": "bundler"). The alternative is rewriting the tsconfigs to be composite, and adding file extensions to imports throughout the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module is not ESM compliant

1 participant