Currently transpile_template_literals option is enabled by default:
|
/// Transpiles styled-components tagged template literals to a smaller representation |
|
/// than what Babel normally creates, helping to reduce bundle size. |
|
/// |
|
/// Converts `` styled.div`width: 100%;` `` to `styled.div(['width: 100%;'])`, which is |
|
/// more compact than the standard Babel template literal transformation. |
|
/// |
|
/// Default: `true` |
|
#[serde(default = "default_as_true")] |
|
pub transpile_template_literals: bool, |
The purpose of this option is to produce more compact output than you get when transpiling template literals. But Oxc doesn't support down-levelling to below ES6, so template literals don't get transpiled. So this option produces longer code than the template literal you get without it.
Therefore, should we disable this option by default?
@Dunqing what do you think?
Currently
transpile_template_literalsoption is enabled by default:oxc/crates/oxc_transformer/src/plugins/styled_components.rs
Lines 114 to 122 in 13470b2
The purpose of this option is to produce more compact output than you get when transpiling template literals. But Oxc doesn't support down-levelling to below ES6, so template literals don't get transpiled. So this option produces longer code than the template literal you get without it.
Therefore, should we disable this option by default?
@Dunqing what do you think?