Using `require.resolve` here to ensure that paths are resolved in the same way that node itself resolves them.