I am trying to bundle the code below using browserify
const { ESLint } = require('eslint');
console.log(ESLint);
And when I include the generated bundle in a html file, I get this error.
Uncaught TypeError: require(...).pathToFileURL is not a function
When I checked the generated bundle I found that it contained require() function. Browserify should recursively replace all require() and combine them into one file, right? I am using Node.js version 14.15.1 and eslint version 8.13.0.
Is there something I've missed. Any help would be really appreciated. Thanks!