Levi
Levi
SCSWC Community
Created by Shahryar on 2/21/2025 in #questions
How can keep css comments after codegen?
because you would need to pass comments into the code generator somewhere, i think
9 replies
SCSWC Community
Created by Shahryar on 2/21/2025 in #questions
How can keep css comments after codegen?
i dont know anything about the css implementation, maybe it's not possible
9 replies
SCSWC Community
Created by Shahryar on 2/21/2025 in #questions
How can keep css comments after codegen?
did you try the cli? to see if it's possible to keep comments in css
9 replies
SCSWC Community
Created by Shahryar on 2/21/2025 in #questions
How can keep css comments after codegen?
Not many people are using the Rust API for codegen it seems, so best to look at the Rust code it uses internally to see how it does it
9 replies
SCSWC Community
Created by Shahryar on 2/21/2025 in #questions
How can keep css comments after codegen?
Have you tried it on SWC playground (if that supports css), or in the cli, and see if it works there? If it does, you should be able to see how it does it in the Rust code
9 replies
SCSWC Community
Created by Shahryar on 1/12/2025 in #questions
Emitter in SWC does not add expected space after '=>' in Arrow Functions
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
Why do you need it to have a space? This sounds like an XY problem
8 replies
SCSWC Community
Created by herman.3682 on 12/25/2024 in #questions
Parsing error
I don’t believe that code is valid in modules
5 replies
SCSWC Community
Created by herman.3682 on 12/25/2024 in #questions
Parsing error
You must be parsing as module. Parsing as script works for me
5 replies
SCSWC Community
Created by Levi on 3/8/2024 in #questions
How to test a visitor that uses visit_mut_script?
I’ve made an issue for now, we can perhaps discuss this further and see if changing it would break anything if you are interested
4 replies
SCSWC Community
Created by Levi on 3/8/2024 in #questions
How to test a visitor that uses visit_mut_script?
So after a bit of digging it seems like visit_mut_module, visit_mut_script and visit_mut_program can be called if you use parse_program (I think?) but not parse_module which is what test_transform seems to use. Should test_transform maybe use parse_program instead? I think this should probably be the case as a test case could be either a module or a script but right now it's assuming it's always a module which I think is bad, parse_program doc states: Returns Module if it's a module and returns Script if it's not a module. so therefor test_transform should probably use parse_program correct?
4 replies