final class StandardConfig extends AnyRef
Configuration of a standard linker.
- Alphabetic
- By Inheritance
- StandardConfig
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val batchMode: Boolean
- val checkIR: Boolean
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val closureCompilerIfAvailable: Boolean
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val esFeatures: ESFeatures
- val experimentalUseWebAssembly: Boolean
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val jsHeader: String
- val maxConcurrentWrites: Int
- val minify: Boolean
- val moduleKind: ModuleKind
- val moduleSplitStyle: ModuleSplitStyle
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val optimizer: Boolean
- val outputPatterns: OutputPatterns
- val parallel: Boolean
- val prettyPrint: Boolean
- val relativizeSourceMapBase: Option[URI]
- val semantics: Semantics
- val sourceMap: Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- StandardConfig → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def withBatchMode(batchMode: Boolean): StandardConfig
- def withCheckIR(checkIR: Boolean): StandardConfig
- def withClosureCompilerIfAvailable(closureCompilerIfAvailable: Boolean): StandardConfig
- def withESFeatures(f: (ESFeatures) ⇒ ESFeatures): StandardConfig
- def withESFeatures(esFeatures: ESFeatures): StandardConfig
-
def
withExperimentalUseWebAssembly(experimentalUseWebAssembly: Boolean): StandardConfig
Specifies whether to use the experimental WebAssembly backend.
Specifies whether to use the experimental WebAssembly backend.
When using this setting, the following properties must also hold:
moduleKind == ModuleKind.ESModule
esFeatures.useECMAScript2015Semantics == true
(true by default)semantics.strictFloats == true
(true by default; non-strict floats are deprecated)
We may lift these restrictions in the future, although we do not expect to do so.
If any of these restrictions are not met, linking will eventually throw an
IllegalArgumentException
.- Exceptions thrown
java.lang.UnsupportedOperationException
In the future, if the feature gets removed.- Note
Currently, the WebAssembly backend silently ignores
,@JSExport
and@JSExportAll
annotations. This behavior may change in the future, either by making them warnings or errors, or by adding support for them. All other language features are supported.This setting is experimental. It may be removed in an upcoming *minor* version of Scala.js. Future minor versions may also produce code that requires more recent versions of JS engines supporting newer WebAssembly standards.
-
def
withJSHeader(jsHeader: String): StandardConfig
Sets the
jsHeader
to a JS comment to add at the top of generated .js files.Sets the
jsHeader
to a JS comment to add at the top of generated .js files.The header must satisfy the following constraints:
- It must contain only valid JS whitespace and/or JS comments (single- or multi-line comment, or, at the very beginning, a hashbang comment).
- It must not use new line characters that are not UNIX new lines (
"\n"
). - If non-empty, it must end with a new line.
- It must not contain unpaired surrogate characters (i.e., it must be a valid UTF-16 string).
Those requirements can be checked with StandardConfig.isValidJSHeader.
- Exceptions thrown
java.lang.IllegalArgumentException
if the header is not valid
- def withMaxConcurrentWrites(maxConcurrentWrites: Int): StandardConfig
- def withMinify(minify: Boolean): StandardConfig
- def withModuleKind(moduleKind: ModuleKind): StandardConfig
- def withModuleSplitStyle(moduleSplitStyle: ModuleSplitStyle): StandardConfig
- def withOptimizer(optimizer: Boolean): StandardConfig
- def withOutputPatterns(f: (OutputPatterns) ⇒ OutputPatterns): StandardConfig
- def withOutputPatterns(outputPatterns: OutputPatterns): StandardConfig
- def withParallel(parallel: Boolean): StandardConfig
- def withPrettyPrint(prettyPrint: Boolean): StandardConfig
- def withRelativizeSourceMapBase(relativizeSourceMapBase: Option[URI]): StandardConfig
- def withSemantics(f: (Semantics) ⇒ Semantics): StandardConfig
- def withSemantics(semantics: Semantics): StandardConfig
- def withSourceMap(sourceMap: Boolean): StandardConfig