fix dist bug and add requirejs dependency