Open shoonia opened 3 years ago
Yeah I'm having big issues trying to get rollup to bundle this module properly because it's using outdated imports/exports
What was your hacky solution?
I solved this by just copying countdown.js into my repo, removing 1346 to 1353, and adding export default countdown
I'd open a pull request but don't know much about the rest of the tooling and don't wanna break anything. If I get some time, I might fork the repo and make a more modern Typescript/ES Module version
You can use the exports map. example: https://github.com/preactjs/preact/blob/4aaecc18d33a9f3139ddd5f30f6d7c745076795f/package.json#L12-L18
And build a few entry point for each export variant example with Rollup.js : https://github.com/shoonia/storeon-velo/blob/master/rollup.config.js#L22-L38
Playground: https://rollupjs.org/repl/
The modern build tooling, browsers, and Nodejs support ES6
import/export
.May you migrate to ES6 export instead of a hacky way to detect the environment