Use the node way to resolve required path to absolute path.
github.com/qiu8310/require-resolve
qiu8310/require-resolve