fix pwa & ssr

This commit is contained in:
AykutSarac 2022-04-27 15:10:53 +03:00
parent d93b24158c
commit 2c0fe50f29
8 changed files with 6 additions and 2873 deletions

View File

@ -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",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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

View File

@ -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 },

View File

@ -104,4 +104,6 @@ const JsonEditor: React.FC = () => {
);
};
export default React.memo(JsonEditor);
const memoizedJsonEditor = React.memo(JsonEditor);
export { memoizedJsonEditor as JsonEditor };