Skip to content

Commit

Permalink
chore(rust): remove add_side_effects
Browse files Browse the repository at this point in the history
doesn't seem to have any effect
  • Loading branch information
wmertens committed Dec 22, 2024
1 parent 4fa4cff commit a39f17a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 76 deletions.
66 changes: 0 additions & 66 deletions packages/qwik/src/optimizer/core/src/add_side_effect.rs

This file was deleted.

1 change: 0 additions & 1 deletion packages/qwik/src/optimizer/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#[cfg(test)]
mod test;

mod add_side_effect;
mod clean_side_effects;
mod code_move;
mod collector;
Expand Down
10 changes: 1 addition & 9 deletions packages/qwik/src/optimizer/core/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::hash::Hasher;
use std::path::{Path, PathBuf};
use std::str;

use crate::add_side_effect::SideEffectVisitor;
use crate::clean_side_effects::Treeshaker;
use crate::code_move::{new_module, NewModuleCtx};
use crate::collector::global_collect;
Expand Down Expand Up @@ -347,14 +346,7 @@ pub fn transform_code(config: TransformCodeOptions) -> Result<TransformOutput, a
},
));
}
if matches!(
config.entry_strategy,
EntryStrategy::Inline | EntryStrategy::Hoist
) {
program.visit_mut_with(&mut SideEffectVisitor::new(
&qwik_transform.options.global_collect,
));
} else if config.minify != MinifyMode::None && !config.is_server {
if config.minify != MinifyMode::None && !config.is_server {
// remove all side effects from client, step 2
program.visit_mut_with(&mut treeshaker.cleaner);
if treeshaker.cleaner.did_drop {
Expand Down

0 comments on commit a39f17a

Please sign in to comment.