Skip to content

Commit 6c3a0bd

Browse files
authored
turns off refresh plugin (#52)
1 parent ff99a79 commit 6c3a0bd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/driver.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,17 @@ impl CompilerInterface for Driver {
5656
}
5757

5858
fn transform_options(&self) -> Option<TransformOptions> {
59-
self.transform.then(|| TransformOptions::enable_all())
59+
self.transform.then(|| {
60+
let mut options = TransformOptions::enable_all();
61+
// Turns off the refresh plugin because it is never idempotent
62+
options.react.refresh = None;
63+
// Enables `only_remove_type_imports` avoiding removing all unused imports
64+
options.typescript.only_remove_type_imports = true;
65+
// Unfinished plugins
66+
options.es2018.object_rest_spread = None;
67+
68+
options
69+
})
6070
}
6171

6272
fn compress_options(&self) -> Option<CompressOptions> {

0 commit comments

Comments
 (0)