@@ -1,4 +1,4 @@
-const withTM = require("next-transpile-modules")(["reaflow"]);
+const withTM = require("next-transpile-modules")(["reaflow", "next-pwa"]);
const nextConfig = withTM({
reactStrictMode: true,
@@ -14,6 +14,11 @@ const nextConfig = withTM({
styledComponents: true,
swcMinify: true,
},
+ pwa: {
+ dest: "public",
+ register: true,
+ skipWaiting: true,
+ },
});
module.exports = nextConfig;
@@ -44,6 +44,7 @@
"gh-pages": "^3.2.3",
"jest": "^28",
"jest-environment-jsdom": "^28.0.0",
+ "next-pwa": "^5.5.2",
"prettier": "^2.6.2",
"ts-node": "^10.7.0",
"typescript": "4.6.3"
@@ -0,0 +1,23 @@
+{
+ "name": "JSON Visio",
+ "short_name": "JSON Visio",
+ "theme_color": "#36393e",
+ "background_color": "#36393e",
+ "display": "standalone",
+ "orientation": "landscape",
+ "scope": "/",
+ "start_url": "/editor",
+ "icons": [
+ {
+ "src": "/192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+
+ "src": "/512.png",
+ "sizes": "512x512",
+ }
+ ]
+}
@@ -72,6 +72,8 @@ class MyDocument extends Document {
href="https://fonts.googleapis.com/css2?family=Catamaran:wght@300;400;500;600;700&family=PT+Sans:wght@400;500;700&display=swap"
rel="stylesheet"
/>
+ <link rel="manifest" href="/manifest.json" />
+ <meta name="theme-color" content="#36393E" />
</Head>
<body>
<Main />