[K/JS] Add the ability to turn off polyfills generating
This commit is contained in:
+6
@@ -267,6 +267,12 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
||||
)
|
||||
var generateDts: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xgenerate-polyfills",
|
||||
description = "Generate polyfills for features from the ES6+ standards."
|
||||
)
|
||||
var generatePolyfills: Boolean by FreezableVar(true)
|
||||
|
||||
@Argument(
|
||||
value = "-Xstrict-implicit-export-types",
|
||||
description = "Generate strict types for implicitly exported entities inside d.ts files. Available in IR backend only."
|
||||
|
||||
@@ -228,6 +228,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
configurationJs.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
|
||||
configurationJs.put(CLIConfigurationKeys.RENDER_DIAGNOSTIC_INTERNAL_NAME, arguments.renderInternalDiagnosticNames)
|
||||
configurationJs.put(JSConfigurationKeys.PROPERTY_LAZY_INITIALIZATION, arguments.irPropertyLazyInitialization)
|
||||
configurationJs.put(JSConfigurationKeys.GENERATE_POLYFILLS, arguments.generatePolyfills)
|
||||
configurationJs.put(JSConfigurationKeys.GENERATE_INLINE_ANONYMOUS_FUNCTIONS, arguments.irGenerateInlineAnonymousFunctions)
|
||||
|
||||
if (!checkKotlinPackageUsage(environmentForJS.configuration, sourcesFiles)) return COMPILATION_ERROR
|
||||
|
||||
Reference in New Issue
Block a user