patriciogonzalezvivo / glslCanvas

Simple tool to load GLSL shaders on HTML Canvas using WebGL

Home Page:http://patriciogonzalezvivo.github.io/glslCanvas/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to import via es6 module

moritzsalla opened this issue · comments

I'm unable to import the dependency directly via es6 modules.

Screenshot 2023-03-27 at 17 56 24

A possible workaround is importing the following but this feels fragile & is suboptimal in terms of package size.

import Canvas from 'glsl-canvas-js/dist/cjs/canvas/canvas'
"glsl-canvas-js": "~0.2.9"
   Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64
    Binaries:
      Node: 18.11.0
      npm: 8.19.2
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.1.6
      eslint-config-next: 13.1.6
      react: 18.2.0
      react-dom: 18.2.0