Gatsby: v2 Umbrella issue

Created on 26 Oct 2017  Â·  22Comments  Â·  Source: gatsbyjs/gatsby

Wanted to start an issue documenting the things that should go into the v2 branch, as well as start talking about when to switch development over to v2 (e.g. make it the default branch) and move v1 into a more "maintenance mode" sort of place.

We're tracking the detailed work needed to be done on the v2 project page https://github.com/gatsbyjs/gatsby/projects/2

Webpack

  • [x] Update to latest v3
  • [x] Switch API to be more reduxy and drop webpack-configurator

    • should we use webpack-atoms directly or keep our own version that is Gatsby focused

  • [ ] Understand and implement all the current LTC strategies (I think this is done?)
  • [x] Simplify default CSS configuration to not use cssnext (#2354)

Babel

Plugins

Under consideration

What else?

Most helpful comment

@jquense - I ended up over here based on an issue filed in Webpack. Given 1.x isn't supported any longer & I had to decline a PR for 1.x from one of your users, I started looking into upgrading Gatsby to 3.x & @KyleAMathews mentioned you have this in progress already.

So, with that I'm at your disposal for any of the Webpack related tasks. If you want a hand, let me know & i'll get you an invite to our Slack to discuss the particulars.

All 22 comments

yup :P forgot we had that one. Might be worth refreshing it tho

@jquense yeah want to back port this + its organization to the other issue?

And I swear I really really want to work on v2 — things just keep coming up sigh. First thing I'm going to work on next week is a new build infrastructure for testing changes against example sites. Both to speed that up + make the logs accessible to contributors.

FYI, in case you haven't seen it, this is a very nice project for Webpack config: https://github.com/andywer/webpack-blocks - breaks everything into little reusable pieces and greatly reduces boilerplate.

@jquense - I ended up over here based on an issue filed in Webpack. Given 1.x isn't supported any longer & I had to decline a PR for 1.x from one of your users, I started looking into upgrading Gatsby to 3.x & @KyleAMathews mentioned you have this in progress already.

So, with that I'm at your disposal for any of the Webpack related tasks. If you want a hand, let me know & i'll get you an invite to our Slack to discuss the particulars.

I have no idea if I have the necessary skills to help on this but do you still need help on upgrading the v2 to webpack 3.x ?

Also, is this issue the 'official' V2 roadmap listing the things that need to be done ? I'd love to help but I don't know where to go to get started :)

I know there were plans to optimize the inlined webpack manifest to include only pages/chunks that are actually linked to on a given page, instead of all of them, because the current solution doesn't work well with a lot of (e.g. +1K) pages. Is it also planned for v2? I probably could help with some of these issues to speed up the release ;)

Started a project page for v2! https://github.com/gatsbyjs/gatsby/projects/2?fullscreen=true

Not all of them are strictly speaking blockers for v2 (some are just annoying bugs that need fixed). Those are at the bottom of the TODO column.

Feel free to jump in and claim issues and start working on them!

Working now on merging @jquense's v2 PRs and getting the v2 branch to a good place.

Great article from Slack on improving webpack build performance https://slack.engineering/keep-webpack-fast-a-field-guide-for-better-build-performance-f56a5995e8f1

I can't wait to have Webpack 3!!! Thanks for the great work!!! :)

Would it make sense to close this issue & track progress on the Gatsby v2 Release project?

It looks like the following tasks are merged into the v2 branch but are not checked off above:

  • Babel 7 (#3492) [pr: #3785]
    (I think this also cleaned up the presets, which closes #1665)
  • switch to uuids (#1853) [pr: #3683]
  • deprecate pathContext for pageContext (#1456) [pr: #3515]
  • deprecate boundActionCreators for actions (#1909) [pr: #3491]
  • use peerDependencies (#1990) [pr: #3671]

@TuckerWhitehouse it's nice to have this open for questions and updates. Updated the checkboxes above. I'll add a link at the top of the issue to point to the project cause yeah, that's where things are being managed.

Webpack v4 has been released, maybe Gatsby could directly do the upgrade to the last version instead of the v3 ?

@monsieurnebo there's a discussion over @ https://github.com/gatsbyjs/gatsby/issues/4151

tl;dr probably won't happen due to wariness about using brand new version just after release + much of the webpack ecosystem we rely on hasn't upgraded e.g. extract-text-webpack-plugin isn't working

Is there a page explaining how to upgrade to v2 alpha? or is it not at a point that it makes sense to use? I updated my global install to 2.0.0-alpha.11 but when i do a gatsby new thing i get 1.9.235 in that project. I very well could be just missing an obvious link somewhere, apologies if that's the case!

@arsdehnel There's no docs yet, although you can see an upcoming list of changes at https://github.com/gatsbyjs/gatsby/blob/v2/Breaking%20Changes.md.

Things are still changing with v2 but if you're feeling bold you can install it with npm i gatsby@next. As v2 is still in alpha you'll be on your own with any problems. Caveat emptor for now :)

@KyleAMathews @m-allanson The current version of Gatsby supports node 4.x, right? Maybe v2 could support only 8.x+?

The end of life for 4.x is pretty soon - 2018-04-30. On the same date 6.x goes into maintenance mode (https://github.com/nodejs/Release#release-schedule)

Compiled code would look much closer to the original, especially that node 8.x supports async/await and this would make quick hacking on Gatsby and its plugins so much easier ;)

@szimek v2 bumps the minimum requirement up to Node 6, which adds support for loads of es2015 features. Node 8+ would be really nice too, but I think dropping support for a version that's still getting updates is too soon - even if it's only in maintenance mode.

I think @KyleAMathews once said "last two stable versions" of node? If we go by that we sohuld be able to drop node 6 as well by release of v2 since v10 is coming out today (tho I think its like 6 months until it's a LTS line, but still maybe it's worth it, especially for native async/await and object spread...

Async/await and object spread are definitely worth it.

This sounds nice but... Node 6 still has another year to go — also, based on the Gatsby workshop I did recently, a lot of people have Node 6 installed still.

We have the v2 project now so closing out this issue https://github.com/gatsbyjs/gatsby/projects/2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kalinchernev picture kalinchernev  Â·  3Comments

ghost picture ghost  Â·  3Comments

KyleAMathews picture KyleAMathews  Â·  3Comments

timbrandin picture timbrandin  Â·  3Comments

mikestopcontinues picture mikestopcontinues  Â·  3Comments