We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 450cb31 commit 29bf3acCopy full SHA for 29bf3ac
crates/swc_ecma_minifier/src/compress/optimize/inline.rs
@@ -259,14 +259,7 @@ impl Optimizer<'_> {
259
260
Expr::Lit(lit) => match lit {
261
Lit::Str(s) => {
262
- // If the string literal is declared without initializer and assigned
263
- // once, we can inline it.
264
- if (ref_count == 1
265
- || (ref_count == 2
266
- && usage.assign_count == 1
267
- && !usage.flags.intersects(VarUsageInfoFlags::REASSIGNED)))
268
- || s.value.len() <= 3
269
- {
+ if ref_count == 1 || s.value.len() <= 3 {
270
true
271
} else {
272
self.vars
0 commit comments