Fixed wasm compilation errors. (#869)

Co-authored-by: rickevry <rickard@rickardnilsson.com>
This commit is contained in:
RickEvry 2020-06-28 16:54:42 +02:00 committed by GitHub
parent 403f081058
commit 67bb568018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,10 @@ pub struct ParseOptions {
pub target: JscTarget,
}
fn default_as_true() -> bool {
true
}
#[derive(Debug, Clone, Default, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "camelCase")]
pub struct Options {
@ -56,12 +60,17 @@ pub struct Options {
#[serde(skip_deserializing, default)]
pub disable_hygiene: bool,
#[cfg(target_arch = "wasm32")]
#[serde(default = "default_as_true")]
pub disable_hygiene: bool,
#[serde(skip_deserializing, default)]
pub disable_fixer: bool,
#[serde(skip_deserializing, default)]
pub global_mark: Option<Mark>,
#[cfg(not(target_arch = "wasm32"))]
#[serde(default = "default_cwd")]
pub cwd: PathBuf,