mirror of
https://github.com/swc-project/swc.git
synced 2024-11-30 15:23:33 +03:00
Fixed wasm compilation errors. (#869)
Co-authored-by: rickevry <rickard@rickardnilsson.com>
This commit is contained in:
parent
403f081058
commit
67bb568018
@ -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,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user