Shahryar
Shahryar
SCSWC Community
Created by Shahryar on 2/21/2025 in #questions
How can keep css comments after codegen?
🥲 🥲 No one has experience with it?
3 replies
SCSWC Community
Created by Shahryar on 1/12/2025 in #questions
Emitter in SWC does not add expected space after '=>' in Arrow Functions
@kdy1 Sorry for interrupting, the space between lines like the top post needs to change source? I mean
let code = r#"
import "phoenix_html";
import { Socket, SocketV1 } from "phoenix";
import { TS } from "tsobject";

// This is first test we need to have
console.log("We are here");

const min = () => {return "Shahryar" + "Tavakkoli"};
"#;
let code = r#"
import "phoenix_html";
import { Socket, SocketV1 } from "phoenix";
import { TS } from "tsobject";

// This is first test we need to have
console.log("We are here");

const min = () => {return "Shahryar" + "Tavakkoli"};
"#;
For now my code delete all the spaces
import "phoenix_html";
import { Socket, SocketV1 } from "phoenix";
import { TS } from "tsobject";
// This is first test we need to have
console.log("We are here");
const min = ()=>{
return "Shahryar" + "Tavakkoli";
};
import "phoenix_html";
import { Socket, SocketV1 } from "phoenix";
import { TS } from "tsobject";
// This is first test we need to have
console.log("We are here");
const min = ()=>{
return "Shahryar" + "Tavakkoli";
};
Thank you in advance --- This is my emmiter
let mut emitter = Emitter {
cfg: Config::default().with_minify(false),
cm: cm.clone(),
comments: Some(&comments),
wr: JsWriter::new(cm.clone(), "\n", &mut buf, None),
};
let mut emitter = Emitter {
cfg: Config::default().with_minify(false),
cm: cm.clone(),
comments: Some(&comments),
wr: JsWriter::new(cm.clone(), "\n", &mut buf, None),
};
8 replies
SCSWC Community
Created by Shahryar on 1/12/2025 in #questions
Emitter in SWC does not add expected space after '=>' in Arrow Functions
Sorry as I understood there is no option and If i want to edit this I should change the lib source? Sorry I am not native english speaker
8 replies
SCSWC Community
Created by Shahryar on 1/10/2025 in #questions
Does SWC remove comments in the code when transforming a JS file's AST and converting it back to a c
Soooo much thank you!!! My last question As my understanding (basic rust) it is serialize, is there any deserialize option? @kdy1 Sorry I am very new to rust, I find some deserialize in rustdoc. but I do not know it covers or not Thank you in advance
6 replies
SCSWC Community
Created by Shahryar on 1/10/2025 in #questions
Does SWC remove comments in the code when transforming a JS file's AST and converting it back to a c
Thank you, yes I meant SWC rust function, and do you have info about my second question? AST --> to Json and Json --> to AST @kdy1
6 replies