How to avoid quick import optimization? (advice needed)

I am faced with a situation that does not seem to have a clean solution - I would appreciate advice from more experienced developers.

I like to optimize my code at each save, including optimizing the imports.
I also save my work every x seconds, to be on the safe side.

This means that I sometimes `import { something } from 'a-library'` and before I have the opportunity to use `something` in my code, the code is optimized and, poof, it is gone.

How do you handle such cases? Not optimize on saving? Not optimize imports? Something else?

0
1 comment

I'd say - do not optimize on saving, do this explicitly once you complete your work to make sure that imports you are going to use later are not removed

0

Please sign in to leave a comment.