cloudflare/next-on-pages

[๐Ÿ› Bug]: `wasm` imports don't work

dario-piotrowicz opened this issue ยท 1 comments

Cli version

0.10.0

next-on-pages environment related information

System:
        Platform: darwin
        Arch: arm64
        Version: Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
        CPU: (10) arm64 Apple M1 Pro
        Memory: 32 GB
        Shell: /bin/zsh
Binaries:
        Node: 16.16.0
        Yarn: 1.22.15
        npm: 8.11.0
        pnpm: 6.11.0
Package Manager Used: npm
Relevant Packages:
        @cloudflare/next-on-pages: 0.10.0
        vercel: 28.20.0
        next: 13.3.1

Description

If we try to import wasm modules in a Next app the next-on-pages build process fails, it should allow such imports

Reproduction

https://github.com/dario-piotrowicz/next-apps-for-testing/tree/master/apps/simple-wasm-pages-13.3.1

Additional Information

next dev generates a runtime error when importing a wasm module is the edge runtime is used, is wasm not supported on edge runtime?

Note: I am creating this issue purely for simple user defined wasm imports, it's not a duplicate of #39 as that relates to the @vercel/og dependency (and fixing this issue will likely not fix #39)