I'm trying to load a script file using 'Modified Java Script Value' in pentaho like the following.

In the file index.js, I have some have java script code which uses require to get some other module. Like const add = require('add')
But when I run the transformation, it gives an error 'ReferenceError: "require" is not defined'.
Does this step supports keywords like 'require'. I'm trying to understand what does this step supports in terms of java script.
And also one question that I have is, does this step supports requiring npm packages? If yes, how to do that? Thanks.