Skip to content

Instantly share code, notes, and snippets.

@charisTheo
Created December 11, 2020 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charisTheo/57ca5be84e02f59766837618885b3437 to your computer and use it in GitHub Desktop.
Save charisTheo/57ca5be84e02f59766837618885b3437 to your computer and use it in GitHub Desktop.
/* Next.js example */
import dynamic from 'next/dynamic'
// import ReactPlayer from 'react-player' -> instead of this line
const ReactPlayer = dynamic(() => import(/* webpackChunkName: "ReactPlayer" */ 'react-player'))
/* Fusion.js example */
import { split } from 'fusion-react'
const ReactPlayer = split({ load: () => import(/* webpackChunkName: "ReactPlayer" */ 'react-player' )})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment