that'd be awesome to have real value here, and answer from CF yes!
that'd be awesome to have real value here, and answer from CF yes!





env from cloudflare:workers? import { env } from "cloudflare:workers";cloudflare:workers to Webpack externals?nextjs, i just want to define a /api/test and call env.MY_KV.get("mykey") in /api/test?webpack option customized with your confignext.config.mjs as abovecloudflare:workerscloudflare:workers import { env } from "cloudflare:workers"nextjs/api/test/api/testenv.MY_KV.get("mykey")webpacknext.config.mjs⨯ cloudflare:workers
Module build failed: UnhandledSchemeError: Reading from "cloudflare:workers" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "cloudflare:" URIs.
Import trace for requested module:
cloudflare:workers// or maybe export default? this may differ per environment
module.exports = {
// ...other options
webpack: (config) => {
config.externals = ['cloudflare:workers'];
return config
}
}const nextConfig = {
webpack: (config) => {
config.externals = ["cloudflare:workers"];
return config;
},
};
export default nextConfig;