-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hello,
thanks for this tool, it works great! But not when bundled:
import { createCanvas, loadImage } from "https://raw.githubusercontent.com/DjDeveloperr/deno-canvas/master/mod.ts"
let canvas = createCanvas(200, 200)
let ctx = canvas.getContext("2d")
let img = await loadImage('img.jpg')
ctx.drawImage(img, 0, 0)It works fine as deno run script.js. But when I deno bundle script.js bundle.js and deno run bundle.js or deno compile script.js (which presumably internally also calls deno bundle) and ./script, I get
error: Uncaught TypeError: Cannot read properties of undefined (reading 'MakeCanvas')
return canvas.MakeCanvas(width, height);
^
at createCanvas (file:///b/some%20test/bundle.js:6752:19)
at file:///b/some%20test/bundle.js:6754:15
Any idea why that could be? And how to solve it? Is it a Deno bug and should be reported there?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels