Update index.js

Added a file preprocessing hook.