ccapture.js
ccapture.js copied to clipboard
Rewrite build scripts and introduce a bundler
Hey, I could contribute to this library and rewrite it using ES6 imports + rollup like three.js is doing.
This could be the "clean" way to fix #78.
Are you interested?
Yes, please. I've been trying to understand the latest landscape on modules across browser and node and i'm even more confused than before. I nowadays only code ES6 modules, no npm dependencies. I've found that node 14 has ES6 imports, but then require doesn't work. So if anyone can draft what the best, most straightforward way of delivering libraries is, i'll be very thankful.
Yes, please. I've been trying to understand the latest landscape on modules across browser and node and i'm even more confused than before.
😆
Sure! Do you prefer one big PR or multiple smaller PRs?
Three.js is using ES6 imports, they aren't actually node 14 imports, they work in node only thanks to the rollup bundler, the most common bundler used for libraries (webpack and parcel are more for projects).
It is good practice to write a library using ES6 imports instead of requires if the library target is the browser, since they're supported natively. However the bundler takes the library code and puts it all together in a single umd (Universal Module Definition) file which works everywhere, node or browser.
If you want to read more: https://medium.com/webpack/webpack-and-rollup-the-same-but-different-a41ad427058c
Hope I didn't confuse you even more. 😄
So was any progress made? If not: Sprite, do you commit to reviewing and merging the PR(s) if Marcofugaro creates them? Marcofugaro, are you still willing to create the PR(s)? Is there anything else that either of you need?