I’m trying to use noisejs as a node.js module. I’ve modified webpack.common.js to import node modules:
“lib”: path.resolve (__dirname, “node_modules”)
I try to import the library like this
import Noise from ‘lib/noisejs’;
…
var noise = new Noise(Math.random());
But this code returns an error:
Uncaught TypeError: _noisejs2.default is not a constructor
How can I fix it?