carbon-design-system / gatsby-theme-carbon

A Carbon inspired Gatsby theme
https://gatsby.carbondesignsystem.com/
Apache License 2.0
359 stars 275 forks source link

Gatsby v5 ☂️ #1324

Closed eng618 closed 5 months ago

eng618 commented 1 year ago

Summary

Upgrade the theme to use Gatsby v5

Justification

Keeping up with technology changes, and security compliance.

### Tasks
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1425
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1426
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1427
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1428
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1439
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1440
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1449
- [ ] https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1429
eng618 commented 1 year ago

Most of this work is done on the next branch.

The remaining pieces are as follows:

eng618 commented 1 year ago

For a little more context. The defaultLayouts node for the gatsby-plugin-mdx plugin is no longer a valid configuration. So, the below templates for Default.js and Homepage.js need to be converted into components that can be injected into every page. There are a few ways to do this, as outlined in the linked docs above.

{
  resolve: `gatsby-plugin-mdx`,
  options: {
    extensions: mdxExtensions,
    gatsbyRemarkPlugins: [
      ...defaultRemarkPlugins,
      ...gatsbyRemarkPlugins,
    ],
    remarkPlugins,
    defaultLayouts: {
      default: require.resolve('./src/templates/Default.js'),
      home: require.resolve('./src/templates/Homepage.js'),
      ...extraLayouts,
    },
  },
},
muditjuneja commented 9 months ago

More observed issues in next -

Screenshot 2024-02-08 at 2 06 16 AM Screenshot 2024-02-08 at 2 06 32 AM
alisonjoseph commented 8 months ago

@eng618 was looking at the webpack warnings and I think it may be something we can ignore. https://robertmarshall.dev/blog/fix-warn-chunk-commons-mini-css-extract-plugin-error-in-gatsby-js/