Is there a step-by-step guide to pack CodeMirror to use in a browser extension?

I have been using CodeMirror 5 in a (userscript manager) browser extension with linting for JavaScript & CSS (only).

Is there a guide on generating the necessary CM6 (and linters) code to include in the browser extension?

I have developed a browser extension using CodeMirror 6. I’m not sure about generating generating linters but I have used vite and crxjs for building and creating my extension. You have visit this link