Build System: added rollup to produce es2015 & es5 imports, flattened types file#199
Build System: added rollup to produce es2015 & es5 imports, flattened types file#199ScottAwesome wants to merge 1 commit intoflightcontrolhq:mainfrom
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.jsonto utilize the newexportssyntax 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 theexportsconditions 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.0Thanks!