Merge pull request #274 from timlrx/fix/dev-socket
fix: do not load socketio for next dev
This commit is contained in:
commit
16e1b682ab
@ -3,7 +3,7 @@
|
||||
"version": "1.2.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node ./scripts/next-remote-watch.js ./data",
|
||||
"start": "cross-env SOCKET=true node ./scripts/next-remote-watch.js ./data",
|
||||
"dev": "next dev",
|
||||
"build": "next build && node ./scripts/generate-sitemap",
|
||||
"serve": "next start",
|
||||
|
@ -9,6 +9,7 @@ import LayoutWrapper from '@/components/LayoutWrapper'
|
||||
import { ClientReload } from '@/components/ClientReload'
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV === 'development'
|
||||
const isSocket = process.env.SOCKET
|
||||
|
||||
export default function App({ Component, pageProps }) {
|
||||
return (
|
||||
@ -16,7 +17,7 @@ export default function App({ Component, pageProps }) {
|
||||
<Head>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
</Head>
|
||||
{isDevelopment && <ClientReload />}
|
||||
{isDevelopment && isSocket && <ClientReload />}
|
||||
<Analytics />
|
||||
<LayoutWrapper>
|
||||
<Component {...pageProps} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user