[major] refactor to minify and setup replace plugin