nitro
nitro copied to clipboard
cloudflare modules
https://github.com/nuxt/framework/issues/484
https://developers.cloudflare.com/workers/cli-wrangler/configuration#modules
Using this, we can natively use imports for chunks instead of using one entry (maybe behind a flag?)
~~An alternative might be using KV + eval but last time checked both eval
and importScripts
were forbidden due to security concerns they had. So it is probably the only way to use the native option.~~
Note: This is not replacing normal workers as is a paid service.
Note: This is not replacing normal workers as is a paid service.
I'm not sure what you mean with this sentence... But I can confirm that eval is not supported : https://developers.cloudflare.com/workers/runtime-apis/web-standards/#javascript-standards
I was going to open a issue for a cloudflare pages preset proposal based off of this https://github.com/unjs/nitro/discussions/110 discussion, but wanted to make sure it's not a duplicate of this one first. This issue is tagged as a preset proposal as well, though atleast to me cloudflare modules
itself sound like a change from the existing old cloudflare workers syntax to to ES modules. Does this issue include a cf pages preset or should I open a seperate one which people can then be pointed at?
Closing as this landed with https://github.com/unjs/nitro/pull/681