Skip to content

Commit

Permalink
fix: default build target to es2022
Browse files Browse the repository at this point in the history
  • Loading branch information
magne4000 committed Aug 8, 2024
1 parent ca23751 commit 6935208
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ dist

# Cloudflare
.wrangler/

.idea
6 changes: 6 additions & 0 deletions packages/vike-cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 6935208

Please sign in to comment.