I can't seem to import dat.gui into javascript;
I'm using
import * as dat from 'dat.gui';
const gui = new dat.GUI();
When I run my code an error shows stating: Uncaught SyntaxError: Cannot use import statement outside a module. I've tried adding type='module' to the script but it didn't end up working. I was wondering if anyone has run into the same issue and could help me out, thanks.
Once the library is loaded, you can access it via
window.dator simplydatWhen you are going with NodeJS, you can
import(ES6) orrequire(CommonJS).