Can I import dataviewjs from other file?

FYI, Dataview now provides a cleaner way to include custom JS. You can put the js file anywhere in your vault (say, Files/my_view.js) and then invoke it with dv.view("Files/my_view.js")

More info here: Codeblock Reference - Dataview