TehShrike / abstract-state-router

The best way to structure a single-page webapp.
http://tehshrike.github.io/state-router-example
296 stars 26 forks source link

Update so many dependencies #141

Closed saibotsivad closed 3 years ago

saibotsivad commented 3 years ago

notes.txt

A few things to mention:

update deps

I updated all the dependencies, and then made sure that npm run test and npm run test:browser worked. Then I also temporarily changed the tests so that they would fail, and reran them to make sure that they actually failed. Always a little nervous about major version bumps...

normalize to ~

The libs that were yours, I normalized the package.json to use ~ on the version number. It wasn't consistent, and I know it doesn't matter in this case but it was bugging me. 😅

babel

The babel update is kind of big: they did away with babel-preset-* in favor of @babel/preset-env which uses some defaults for what browser versions etc it transpiles/polyfills for. They suggest adding a config to make presets explicit, but otherwise it looks like the defaults are appropriate. Also they deprecated babel-helpers. Neat.

rollup

With the new Rollup config, one thing I'm still unclear on is what the external option means...

My understanding is that external (now at least) means Rollup won't put those libs in to the final bundle. But that doesn't seem quite right: the Electron/browser tests pass with external still set, and I don't think it can resolve them otherwise, so honestly I'm not sure how all the tests pass?

(Note: if I drop the external from the Rollup config, all tests still pass, but the bundle size is ~2x bytes.)

TehShrike commented 3 years ago

huh... those Babel helpers do make me nervous... if babelHelpers is changed to runtime, what gets imported from @babel/runtime in the final bundle?

saibotsivad commented 3 years ago

Just bumped those dependency versions again, since it's been a while. Nothing major to report, just the ones original to the pull request.