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

Adds modules and configuration to produce an ES module bundle. #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qubyte
Copy link

@qubyte qubyte commented Sep 2, 2019

I'd like to integrate ibankit with a project using ES modules. This PR:

  • Adds rollup config to take the TS source and spit out a single module file (with ES5 content).
  • Updates the build script to run rollup after running tsc.

This PR places the ES build alongside the other build artefacts in the. ./lib folder.

This PR is intended to broach the subject. If this PR is welcome, then it may be better to place bundles in a dist folder. There may also be an argument for including a single UMD bundle too, so all possible module systems (or lack thereof) are addressed:

ibankit-js/
└── dist/
    ├── ibankit.umd.js
    └── ibankit.esm.js

That said, I don't know how to express the location of the UMD module in package.json when there's already a set of CommonJS. modules referenced by the main field (ESM is easy because module was unused).

Base automatically changed from master to main March 18, 2021 17:15
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.

1 participant