Skip to content

Commit

Permalink
chore: actually make the option optional
Browse files Browse the repository at this point in the history
  • Loading branch information
GrygrFlzr committed Jul 7, 2021
1 parent 4b35a8a commit 734c8fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
15 changes: 12 additions & 3 deletions packages/kit/src/core/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ async function build_client({
}
};

// don't warn on overriding defaults
const [modified_user_config] = deep_merge(default_config, user_config);

/** @type {[any, string[]]} */
const [merged_config, conflicts] = deep_merge(default_config, user_config, {
const [merged_config, conflicts] = deep_merge(modified_user_config, {
configFile: false,
root: cwd,
base,
Expand Down Expand Up @@ -424,8 +427,11 @@ async function build_server(
}
};

// don't warn on overriding defaults
const [modified_user_config] = deep_merge(default_config, user_config);

/** @type {[any, string[]]} */
const [merged_config, conflicts] = deep_merge(default_config, user_config, {
const [merged_config, conflicts] = deep_merge(modified_user_config, {
configFile: false,
root: cwd,
base,
Expand Down Expand Up @@ -539,8 +545,11 @@ async function build_service_worker(
}
};

// don't warn on overriding defaults
const [modified_user_config] = deep_merge(default_config, user_config);

/** @type {[any, string[]]} */
const [merged_config, conflicts] = deep_merge(default_config, user_config, {
const [merged_config, conflicts] = deep_merge(modified_user_config, {
configFile: false,
root: cwd,
base,
Expand Down
5 changes: 4 additions & 1 deletion packages/kit/src/core/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ class Watcher extends EventEmitter {

const alias = user_config.resolve && user_config.resolve.alias;

// don't warn on overriding defaults
const [modified_user_config] = deep_merge(default_config, user_config);

/** @type {[any, string[]]} */
const [merged_config, conflicts] = deep_merge(default_config, user_config, {
const [merged_config, conflicts] = deep_merge(modified_user_config, {
configFile: false,
root: this.cwd,
resolve: {
Expand Down

0 comments on commit 734c8fc

Please sign in to comment.