Skip to content

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

Open
qubyte wants to merge 1 commit into
koblas:mainfrom
qubyte:provide-esm-bundle
Open

Adds modules and configuration to produce an ES module bundle.#5
qubyte wants to merge 1 commit into
koblas:mainfrom
qubyte:provide-esm-bundle

Conversation

@qubyte

@qubyte qubyte commented Sep 2, 2019

Copy link
Copy Markdown

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