unenv icon indicating copy to clipboard operation
unenv copied to clipboard

Examples

Open lawrencecchen opened this issue 3 years ago • 5 comments

How can I use this? Are there any examples? Looking to port stripe-node to work on cloudflare pages and wasn't sure if this would be one of unenv's use cases. If someone could guide me, would love to start and contribute an examples folder.

lawrencecchen avatar Jan 18 '22 05:01 lawrencecchen

I subscribe to this one. Are there docs to read further about how unenv works?

pepicrft avatar Apr 14 '22 08:04 pepicrft

Not sure but this helped me

https://github.com/unjs/unenv/issues/39

wobsoriano avatar May 29 '22 08:05 wobsoriano

Thanks for linking @wobsoriano. PR is more than welcome if you like to contribute to the docs! I can also give an outline to help :)

pi0 avatar May 31 '22 20:05 pi0

Im looking to try running express in a worker, should I give up? I can't tell how I'd convert a worker event to a request for express.

janat08 avatar Jun 25 '22 15:06 janat08

@pi0 I'd be happy to contribute docs and or runnable examples, once I understand how to apply this to projects and/or libraries consumed by those projects.

For my use case, I am trying to get around something simple like using libraries like lodash in middleware.js and running into the Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Middleware error when building a Next.js 12 project for production for it's Edge Runtime. In the case with lodash it has a Node API (Buffer) which is throwing an error.

kevinold avatar Sep 22 '22 12:09 kevinold