Open idealley opened 4 years ago
Thanks for opening issue! Please share a minimum reproducible repository.
Having same issue here.
Same issue here.
Here's my gridsome.config.js
:
const manifest = require('./static/manifest.json');
module.exports = {
siteName: 'SiteNameHere',
plugins: [
{
use: 'gridsome-plugin-manifest',
options: manifest
},
{
use: 'gridsome-plugin-pwa',
options: {
title: manifest.name,
startUrl: manifest.scope,
display: manifest.display,
statusBarStyle: 'default',
manifestPath: './static/manifest.json',
cachedFileTypes: 'js,json,css,html,png,jpg,jpeg,svg',
shortName: manifest.shortName,
themeColor: manifest.theme_color,
backgroundColor: manifest.background_color,
icon: manifest.icon_path,
msTileImage: manifest.icon_path,
msTileColor: manifest.theme_color
}
}
Changing the package by removing export
to module. exports = {register, unregister};
resolves the issue, although it's a hack that won't persist on fresh builds.
Same error
I have the following error message in the console:
The export is not understood by
const { register } = require('register-service-worker')
ingridsome.client.js
Just moving the code as follow solved the issue for me:
from
to