I am trying to implement this github project to my React web app. It is an external script to put a fancy canvas in the background.
I have tried to load it:
import {WarpSpeed} from './warpspeed.js'
import WarpSpeed from './warpspeed.js'
And then create a new instance:
let x = new WarpSpeed("canvasID")
But it throws an error:
TypeError: __WEBPACK_IMPORTED_MODULE_4__helpers_warpspeed___default.a is not a constructor
I also tried to use react-load-script, but it does not make sense I cannot call new WarpSpeed after, because it is undefined.
import WarpSpeed from '...'new WarpSpeed. Soimport "./warpspeed.js"hm, actually this might not work as stated here: Import an entire module for side effects only, without importing anything. This runs the module's global code, but doesn't actually import any values.import '/modules/my-module.js';