When I import promptfoo in a front end React component, an then try to run essentially a hello-world evaluation, I get a JS console error complaining that "process is not defined", pointing to JS module unrelated to promptfoo. Web search shows other instances of the error string are related to either (1) the library not usable on the front end, and/or (2), the need to add something like this to the Node configuration:
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
APP_ENV: JSON.stringify('browser')
}
// 'process.env': {
// 'NODE_ENV': JSON.stringify(process.env.NODE_ENV)
// }
})
Can you advise? Thanks