5 Jan 2025
Cannot find name 'ServiceWorkerGlobalScope' in serwist
Inside tsconfig.json
// before
{
"compilerOptions": {
"lib": [
// ... other libs
],
},
// other settings
"exclude": [
// other paths
]
}
// now
{
"compilerOptions": {
"lib": [
"webworker"
],
"types": [
"@serwist/next/typings"
]
},
"exclude": [
"public/sw.js"
]
}
We need to add below things:
webworker
in lib- inside compilerOptions add types array and inside types add
@serwist/next/typings
- inside exclude add
public/sw.js
You may also like
Introduction to Object-Oriented Programming (OOP) in Python
This blog provides a comprehensive introduction to Object-Oriented P...
Continue readingCreating an accessible website using HTML and CSS
This guide provides web developers with an overview of how to create...
Continue readingExtracting Data with Beautiful Soup from HTML and XML
Beautiful Soup is a Python library that can be used for extracting d...
Continue reading