-
Notifications
You must be signed in to change notification settings - Fork 93
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
Build System: added rollup to produce es2015 & es5 imports, flattened types file #199
base: main
Are you sure you want to change the base?
Conversation
…ollup for typescript types
Hi @ScottAwesome! I‘m currently on vacation and will only be able to take a closer look in a couple of weeks - only took a very shallow look from my phone for now. I‘m wondering what benefits arise from these changes. It‘s in the project‘s interest to stay as easy to maintain as possible, so I‘d like to be careful with adding complexity. Could you outline the issues with the current build system, and how this PR addresses them? |
Sure I'd be happy to elaborate! I understand it may ultimately not be a good fit. That said, here's the limitations I feel building with raw
I wish I could find the article I read months ago from early 2022, but I recall flat file builds are suppose to be easier to do dead code elimination as well for bundlers. I can't seem to find it though. |
I could just swap this for microbundle too. Looks like the main |
Thank you for outlining the pros and cons! Personally, I'm a fan of keeping things simple. I don't see a convincing benefit from changing the bundling mechanism in this list, and would rather wait for |
This PR adds rollup as the build system and adds DTS rollup via
rollup-plugin-dts
. This build will produce both es2015 and es5 builds.I have also modified the
package.json
to utilize the newexports
syntax to make import paths easier. This is compatible all the way back to Node 12 (and its ignored by older versions beyond that). Rollup, vite, parcel and webpack all understand theexports
conditions by default as well.I figured this might be a major version bump, since it slightly changes the import semantics, so I also bumped this to
2.0.0
Thanks!