mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
fix pwa & ssr
This commit is contained in:
parent
d93b24158c
commit
2c0fe50f29
@ -5,7 +5,6 @@ const withPWA = require("next-pwa");
|
||||
*/
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
swcMinify: true,
|
||||
exportPathMap: () => ({
|
||||
"/": { page: "/" },
|
||||
"/editor": { page: "/editor" },
|
||||
@ -13,12 +12,7 @@ const nextConfig = {
|
||||
compiler: {
|
||||
styledComponents: true,
|
||||
},
|
||||
experimental: {
|
||||
esmExternals: "loose",
|
||||
outputStandalone: true,
|
||||
},
|
||||
pwa: {
|
||||
disable: true,
|
||||
dest: "public",
|
||||
register: true,
|
||||
scope: "/editor",
|
||||
|
115
public/sw.js
115
public/sw.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
public/workbox-6316bd60.js
Normal file
1
public/workbox-6316bd60.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,17 +1,12 @@
|
||||
import React from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
import { Sidebar } from "src/components/Sidebar";
|
||||
import { LiveEditor } from "src/containers/LiveEditor";
|
||||
import { Loading } from "src/components/Loading";
|
||||
import { JsonEditor } from "src/containers/JsonEditor";
|
||||
import { Incompatible } from "src/containers/Incompatible";
|
||||
import * as Styles from "src/containers/Editor/styles";
|
||||
import { useConfig } from "src/hocs/config";
|
||||
import { Allotment } from "allotment";
|
||||
|
||||
const JsonEditor = dynamic(() => import("src/containers/JsonEditor"), {
|
||||
loading: () => <Loading message="Loading Editor..." />,
|
||||
});
|
||||
|
||||
const Editor: React.FC = () => {
|
||||
const {
|
||||
states: { settings },
|
||||
|
@ -104,4 +104,6 @@ const JsonEditor: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(JsonEditor);
|
||||
const memoizedJsonEditor = React.memo(JsonEditor);
|
||||
|
||||
export { memoizedJsonEditor as JsonEditor };
|
||||
|
Loading…
x
Reference in New Issue
Block a user