diff --git a/.gitignore b/.gitignore index 44624cf..4a56258 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,5 @@ dist # Cloudflare .wrangler/ + +.idea diff --git a/packages/vike-cloudflare/src/index.ts b/packages/vike-cloudflare/src/index.ts index 63a835e..5766817 100644 --- a/packages/vike-cloudflare/src/index.ts +++ b/packages/vike-cloudflare/src/index.ts @@ -57,6 +57,12 @@ export const pages = (options?: VikeCloudflarePagesOptions): Plugin => { return getAsset(options?.server?.kind); } }, + config(userConfig) { + if (!userConfig.build?.target) { + userConfig.build ??= {}; + userConfig.build.target = 'es2022'; + } + }, configResolved: async (config) => { resolvedConfig = config; },