Create a file in the static
folder of your Gatsby project called sw.js
and add the following line:
importScripts('https://static.edgeme.sh/edgemesh-sw.js')
Install the plugin with from NPM.
$ npm i gatsby-plugin-edgemesh --save
Enable the plugin in your gatsby-config.js
.
module.exports = {plugins: ['gatsby-plugin-edgemesh']}
The Gatsby plugin accepts the same options as all of the other Edgemesh Clients.
module.exports = {plugins: [{resolve: 'gatsby-plugin-edgemesh',options: {// Edgemesh Optionshost: API_URL,swUrl: '/sw.js',scope: '/',lite: false,externalMount: false,softDisable: false}}]}