修复cf兼容性
This commit is contained in:
@@ -11,7 +11,32 @@ const config: OpenNextConfig = {
|
|||||||
queue: 'dummy',
|
queue: 'dummy',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
edgeExternals: ['node:crypto'],
|
edgeExternals: [
|
||||||
|
'node:crypto',
|
||||||
|
'node:async_hooks',
|
||||||
|
'node:buffer',
|
||||||
|
'node:stream',
|
||||||
|
'node:util',
|
||||||
|
'node:events',
|
||||||
|
'node:path',
|
||||||
|
'node:url',
|
||||||
|
'node:fs',
|
||||||
|
'node:http',
|
||||||
|
'node:https',
|
||||||
|
'node:net',
|
||||||
|
'node:tls',
|
||||||
|
'node:dns',
|
||||||
|
'node:os',
|
||||||
|
'node:zlib',
|
||||||
|
'node:vm',
|
||||||
|
'node:child_process',
|
||||||
|
'node:string_decoder',
|
||||||
|
'node:tty',
|
||||||
|
'node:assert',
|
||||||
|
'node:punycode',
|
||||||
|
'node:timers',
|
||||||
|
'node:worker_threads',
|
||||||
|
],
|
||||||
middleware: {
|
middleware: {
|
||||||
external: true,
|
external: true,
|
||||||
override: {
|
override: {
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
name = "moontv-plus"
|
name = "moontv-plus"
|
||||||
compatibility_date = "2024-01-01"
|
compatibility_date = "2024-09-23"
|
||||||
|
compatibility_flags = ["nodejs_compat"]
|
||||||
main = ".open-next/worker.js"
|
main = ".open-next/worker.js"
|
||||||
|
|
||||||
# Cloudflare Pages 配置
|
# 静态资源配置
|
||||||
# 构建命令: pnpm build:cloudflare
|
# Cloudflare Workers Assets 用于服务静态文件
|
||||||
# 主文件: .open-next/worker.js
|
[assets]
|
||||||
|
directory = ".open-next/assets"
|
||||||
# 静态资源
|
binding = "ASSETS"
|
||||||
[site]
|
|
||||||
bucket = ".open-next/assets"
|
|
||||||
|
|
||||||
[env.production]
|
[env.production]
|
||||||
# 生产环境变量可以在 Cloudflare Pages 控制台配置
|
# 生产环境变量可以在 Cloudflare Dashboard 配置
|
||||||
|
|||||||
Reference in New Issue
Block a user