Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] allow users to override build target #2618

Merged
merged 6 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/unlucky-mugs-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] allow users to override build target
5 changes: 4 additions & 1 deletion packages/kit/src/core/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ async function build_server(
const vite_config = config.kit.vite();

const default_config = {
build: {
// set default target as es2020, yet allow users to override
benmccann marked this conversation as resolved.
Show resolved Hide resolved
target: 'es2020'
},
server: {
fs: {
strict: true
Expand All @@ -460,7 +464,6 @@ async function build_server(
root: cwd,
base: assets_base,
build: {
target: 'es2020',
ssr: true,
outDir: `${output_dir}/server`,
polyfillDynamicImport: false,
Expand Down