Skip to content

[www] Add 'Upgrading to v2' docs page #3986

@m-allanson

Description

@m-allanson

Create an Upgrading to Gatsby v2 guide.

  • Manually install react and react-dom, along with any dependencies required by your plugins.
  • Layouts have been removed. To achieve the same behavior as v1, you have to wrap your pages and page templates with your own Layout component. Since Layout is a non-page component, making query has to be done with StaticQuery.
  • boundActionCreators => actions
  • pathContext => pageContext
  • Deprecated responsive image query names
  • Remove postcss plugins (cssnext, cssimport) from default css loader config
  • Mixed commonjs/es6 modules fail
  • Source & transformer plugins now use UUIDs for ids. If you used glob or regex to query nodes by id then you'll need to query something else.
  • Remove explicit polyfill and use the new builtins: usage support in babel 7.
  • Changed modifyBabelrc to onCreateBabelConfig
  • Changed modifyWebpackConfig to onCreateWebpackConfig
  • Inlining CSS changed — remove it from any custom html.js as done automatically by core now.
  • Add instructions on converting layouts for sites with many pages (Refer to Add gatsby-plugin-layout docs to v2 migration post #5753)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions