Next.js Discord

Discord Forum

ReferenceError: document is not defined

Unanswered
European hornet posted this in #help-forum
Open in Discord
European hornetOP
seems to be that in canary (using revision 173), im trying to import a client component and seems to crash now

'use client';

// Packages
import React from 'react';
import dynamic from 'next/dynamic.js';

const PlitziSdkLightWrapper = dynamic(() => import('./PlitziSdkLightWrapper.js')); // , { ssr: false }

const SdkLightLoader = props => <PlitziSdkLightWrapper {...props} />;

export default SdkLightLoader;


not sure what is wrong in this case due that im using lazy load to avoid this getting compiled in build time

0 Replies