Skip to content
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

Investigate switching or updating build tooling #188

Closed
markerikson opened this issue Sep 7, 2019 · 10 comments
Closed

Investigate switching or updating build tooling #188

markerikson opened this issue Sep 7, 2019 · 10 comments

Comments

@markerikson
Copy link
Collaborator

markerikson commented Sep 7, 2019

We currently have a build setup that started off as a clone of Redux's setup, and then was modified when we did the conversion to TS.

Redux itself is currently being rewritten in TS, so there's updates to its build tooling going on atm. Meanwhile, tools like https://github.com/palmerhq/tsdx and https://github.com/developit/microbundle are supposed to make it easier to build and publish packages that have good output.

I'm open to updates to our build setup, and would appreciate it if someone could take the time to evaluate what we currently have for RSK compared to the other options.

I did briefly play with TSDX, and remember running into some pain points with how it could be configured. I don't remember specifics, although I think part of it may have been how it tried to name output files (especially UMD builds).

Related issues: #78 (can't tree shake properly due to dependencies)

@RichiCoder1
Copy link
Contributor

I've recently moved one or two libraries over to TSDX with a generally good experience. I could likely help with this, though I'm curious what issues you had? As well as what targets you're still chiefly aiming to support and any quirks you're aware of with the current build/test setup?

@markerikson
Copy link
Collaborator Author

Off the top of my head:

  • It changed the name of all the output files ( redux-starter-kit.[type].js -> reduxStarterKit.[type].js)
  • Don't think it let me do both a minified and production UMD build
  • For RSK, I'm pretty sure I want an actual bundled UMD build that includes Redux, Reselect, Immer, etc, all in one bundle. TSDX extracted those as external global dependencies.

So, largely UMD-related, I think.

@RichiCoder1
Copy link
Contributor

RichiCoder1 commented Sep 9, 2019

Cool beans! (1) and (3) are just rollup defaults I believe, so should just be tweaking some knobs.

For

Don't think it let me do both a minified and production UMD build

I'm not sure I follow? Did you mean a dev (unminified/DEV unremoved build) and prod (minified) build?

@markerikson
Copy link
Collaborator Author

Heh, yeah, wrong phrasing :)

@RichiCoder1
Copy link
Contributor

That doesn't sound insurmountable. I'll give it a go hopefully this week or weekend!

@markerikson
Copy link
Collaborator Author

Great, thanks!

@RichiCoder1
Copy link
Contributor

@markerikson I'm finally getting around to it, and looking into it I'm not sure that'd you'd actually gain much moving to TSDX/Microbundle. If only just cuz it looks like you've already good a pretty optimized rollup and lint going. It would slim down you scripts a little and get you more of a "standard" build setup, but that's up to you. If you're still game I can knock this out :)

@markerikson
Copy link
Collaborator Author

I'd at least be curious to see how it would compare, yeah.

Also, if you're looking into this, any chance you could also glance at #55 and #78 , and figure out if there's some way to improve our tree shaking ability? If not, no worries, just thought I'd check.

@RichiCoder1
Copy link
Contributor

I'll getcha a PR for comparisons then!

No expert on tree shaking, but I'll take a look! Been trying to do those sort of optimizations for our work packages

@markerikson
Copy link
Collaborator Author

Resolved via #212 .

markerikson pushed a commit that referenced this issue Apr 20, 2021
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

No branches or pull requests

2 participants