second-state / wasmedge-quickjs

A high-performance, secure, extensible, and OCI-complaint JavaScript runtime for WasmEdge.
Apache License 2.0
477 stars 59 forks source link

ReferenceError: could not load module filename 'module' #137

Open zero9527 opened 4 months ago

zero9527 commented 4 months ago

使用 koa 创建一个项目,然后通过webpack构建输出esmodule

在构建产物中,createRequire用来在 esmodule 中使用 require

import{createRequire as __WEBPACK_EXTERNAL_createRequire}from"module";