From 3fa655591ae8a02b9020e614887ded1240e29176 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Wed, 26 Mar 2025 07:53:21 +0000 Subject: [PATCH] PackageToJS: Inherit `swift package -c` configuration by default https://github.com/swiftwasm/JavaScriptKit/pull/309 introduced `-c` option to the plugin side in addition to the `swift package`'s one. However `swift package -c release js` was building with release config before 0.25.0 but it started to build with debug config as the default in 0.25.0. This change makes the plugin to respect the `swift package`'s one if `-c` is not specified after `js` plugin name --- Plugins/PackageToJS/Sources/PackageToJSPlugin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/PackageToJS/Sources/PackageToJSPlugin.swift b/Plugins/PackageToJS/Sources/PackageToJSPlugin.swift index 6ace4b72..9d0b2c19 100644 --- a/Plugins/PackageToJS/Sources/PackageToJSPlugin.swift +++ b/Plugins/PackageToJS/Sources/PackageToJSPlugin.swift @@ -323,7 +323,7 @@ struct PackageToJSPlugin: CommandPlugin { } buildConfiguration = _buildConfiguration } else { - buildConfiguration = .debug + buildConfiguration = .inherit } var parameters = PackageManager.BuildParameters( configuration: buildConfiguration,