Go Pro Sign Up Login

Buy Now and unlock this series







yours forever

Become a Pro and unlock everything




per month

Gatsby Node

Next, we will be working within the gatsby-node file to create pages programmatically. We will be spending some time on this topic because it is a key feature within Gatsby when creating dynamic sites.


Become a pro to download code and videos


Robb Shoe

about 2 years ago [edited]

I could entirely be wrong about this, but I think it's now possible to use the import syntax within Node since about a year ago (after this video was released) (more info on that at https://thecodebarbarian.com/nodejs-12-imports for anyone interested). There's probably an even better way to do this now that I'm unaware of, but for anyone without VSCode whining at them who wants to do this in the more familiar ES6 syntax, it'd just look like this (assuming you have a recent version of Node installed):


Want to join the conversation?

Become a Pro member today!