Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp build system #126

Closed
wants to merge 1 commit into from
Closed

Conversation

andreavaccari
Copy link

Closes #113 and #118

This change fixes issues related to the dual-packaging of CJS and ESM
modules, and uses `tsup` to simplify and speed up the build process.

The key changes are:

- CJS, ESM, and declaration files are all outputted to `./dist`.

- CJS files have `.js` extension, while EMS file have `.mjs`. This
  guarantees compatibility with Node's module resolution system.

- `pkg.exports` reflects the new `dist/` structure.

- `tsconfig.json` extends the Node14 tsconfig base.

- `tsconfig.build-cjs.json` and `tsconfig.build-esm.json` are not
  needed and have been removed.

- `tsconfig.build-types.json` is still needed as `tsup` output results
  in chunked files and removes comments.
@andreavaccari
Copy link
Author

@samhh anything I can do to help get this merged?

@samhh
Copy link
Owner

samhh commented Jul 19, 2022

Hey @andreavaccari! Sorry for my slow follow up, I've been mostly AFK the last few weeks.

It would be helpful for me to know what exactly tsup is doing differently under the hood. On the plus side it's very tempting for me to offload all this bundling stuff to a third party like this... 😉

@samhh
Copy link
Owner

samhh commented Apr 21, 2023

Closing as stale. Happy to revisit if there's interest.

@samhh samhh closed this Apr 21, 2023
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.

eslint-plugin-import/no-unresolved error caused by conditional exports
2 participants