inline commonjs require logic