Refactoring your imports

One of the things I really liked in ES5 meteor was that I could just arbitrarily restructure my files and folder, as well as rename files without it breaking how everything connected.

While I generally like the new import/export syntax, it has put a real damper on how easy it is for me to refactor. I’m wondering if anyone has suggestions on how I could do this more easily. When I use Android Studio, it will detect a file move and automatically update the imports across your entire project. I haven’t been able to find an editor that can do a similar thing for ES6.

Writing the imports initially isn’t bad, but anytime I want to rename a file or move it often requires me to hunt down 10 other files that import it and update all of them. It adds a lot of friction to my development flow.

I’m wondering if others out there are having this issue and if anyone has any suggestions?

1 Like

Maybe this discussion helps: Refactor/move file utilities with Meteor 1.3 Imports

WebStorm can do this with es5, I believe it works in es2015 as well

@efrancis Does it? I haven’t been able to get it to work.