require.undef on local require is not defined. Perhaps should have used window.eval below.