Add PWA support

This commit is contained in:
Marcus Blättermann 2022-12-13 04:03:41 +01:00
parent f1a8ca380f
commit ae2a27e988
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D
4 changed files with 5002 additions and 76 deletions

4
website/.gitignore vendored
View File

@ -39,4 +39,6 @@ next-env.d.ts
!public
public/robots.txt
public/sitemap*
public/sitemap*
public/sw.js*
public/workbox*

View File

@ -1,4 +1,5 @@
import MDX from '@next/mdx'
import PWA from 'next-pwa'
import remarkPlugins from './plugins/index.mjs'
@ -13,17 +14,24 @@ const withMDX = MDX({
},
})
/** @type {import('next').NextConfig} */
const nextConfig = withMDX({
reactStrictMode: true,
swcMinify: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
const withPWA = PWA({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
})
/** @type {import('next').NextConfig} */
const nextConfig = withPWA(
withMDX({
reactStrictMode: true,
swcMinify: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
})
)
export default nextConfig

5043
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@
"md-attr-parser": "^1.3.0",
"next": "13.0.2",
"next-mdx-remote": "^4.2.0",
"next-pwa": "^5.6.0",
"next-sitemap": "^3.1.32",
"parse-numeric-range": "^1.3.0",
"prettier": "^2.7.1",