I want to create a chrome extension that will print out accessibility errors to the console using the axe-core library. My plan was I originally thought I could do this with Browserify to bundle the axe-core library, but to simply add a content.js to the manifest, perform a require line in the contest.js, 'Browserify' content.js, and be ready to go. However, when I load up my extension and view the console, I see the Uncaught ReferenceError: require is not defined still in the console.
Here is content.js:
const axe = require('axe-core');
axe.run().then(results =>{console.log(results)});
Bundle.js is in place as one would expect. All the tutorials show browserify used to bundle node modules for scripts embedded in the html, can it not be used for content_scripts? What is an alternative method for achieving this?