Skip to content

Commit

Permalink
fix(uli-website): update package versions (#483)
Browse files Browse the repository at this point in the history
* Update package versions
- Updated all packages to latest versions
- Added .npmrc to allow required legacy-peer-deps with gatsby and react-dom
- Added gatsby-node.mjs to handle gatsby-plugin-mdx update issues
- Updated index.jsx with gatsby-codemods and manual slug field entry

Co-authored-by: Aatman Vaidya <[email protected]>
  • Loading branch information
duggalsu and aatmanvaidya committed Nov 29, 2023
1 parent 02ab61d commit 03fc41f
Show file tree
Hide file tree
Showing 26 changed files with 6,698 additions and 8,304 deletions.
1 change: 1 addition & 0 deletions uli-website/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
11 changes: 1 addition & 10 deletions uli-website/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ module.exports = {
"gatsby-plugin-styled-components",
"gatsby-plugin-image",
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-plugin-mdx",
options: {
defaultLayouts: {
default: require.resolve(
"./src/components/molecules/ContentPageShell.jsx"
),
},
},
},
"gatsby-plugin-mdx",
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
Expand Down
14 changes: 14 additions & 0 deletions uli-website/gatsby-node.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createFilePath } from "gatsby-source-filesystem"

export const onCreateNode = ({ node, getNode, actions }) => {
const { createNodeField } = actions
if (node.internal.type === 'Mdx') {
const relativeFilePath = createFilePath({ node, getNode })
console.log(relativeFilePath);
createNodeField({
node,
name: 'slug',
value: `${relativeFilePath}`
});
}
};
Loading

0 comments on commit 03fc41f

Please sign in to comment.