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

Commits on Jul 5, 2022

  1. Use tsup for build system

    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 committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    73eed8a View commit details
    Browse the repository at this point in the history