diff --git a/.github/workflows/sync-to-gitee.yml b/.github/workflows/sync-to-gitee.yml index f89f1371f..58d6d72c4 100644 --- a/.github/workflows/sync-to-gitee.yml +++ b/.github/workflows/sync-to-gitee.yml @@ -1,4 +1,4 @@ -name: syncToGitee +name: Sync To Gitee env: # 7 GiB by default on GitHub, setting to 6 GiB # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources diff --git a/packages/vite-plugin-http2-proxy/src/index.ts b/packages/vite-plugin-http2-proxy/src/index.ts index 4d3aad48a..df79abd04 100644 --- a/packages/vite-plugin-http2-proxy/src/index.ts +++ b/packages/vite-plugin-http2-proxy/src/index.ts @@ -1,3 +1,4 @@ +import { version } from 'node:process'; import http2Proxy from 'http2-proxy'; import type { Plugin, ProxyOptions } from 'vite'; @@ -8,6 +9,13 @@ const error = (message: string): never => { export default (options?: Record): Plugin => { let routes: Record; + if (version.startsWith('v2')) { + console.warn( + '[@admin-pkg/vite-plugin-http2-proxy] http2-proxy is not supported in Node.js v20.x+', + ); + return { name: '@admin-pkg/vite-plugin-http2-proxy' }; + } + const configure: Plugin['configureServer'] = ({ middlewares, httpServer }) => { const proxyOptions = options || routes; for (const [regexp, serverOptions] of Object.entries(proxyOptions)) {