I have a project with codemirror, vue 2 and webpack that works great! It uses lang-html extension to format, and gets color highlighting. I updated it to vue 3 with vite, and the highlighting no longer works. I inspected dom, and the html code in the state is not being parsed into tokens in order to style. Any ideas?
Possibly when upgrading, some of the @codemirror packages got duplicated. Yarn and older versions of npm do this. Reinstalling all dependencies, or upgrading to a recent npm, might help with this.
that say you have to set optimizeDeps.exclude. I was doing that, but using glob pattern that is not supported. I had to look in the vite code to discover that:
I switched to using explicit module paths, and it works now!