I\'m a total React newbie and I guess there is something fundamental I don\'t quite understand here. A default Gatsby page looks like this. Is there a way to use a local .js
You can do this very easily with the Gatsby plugin "gatsby-plugin-load-script."
Simply do this:
static
at the root of your gatsby appgatsby-config.js
{
resolve: 'gatsby-plugin-load-script',
options: {
src: '/test-script.js', // Change to the script filename
},
},