use regular to find out entry module
remove unused dependencies
add entryDir option