I want to use wc-codemirror with webpack and it's not possible to import a mode
import '@vanillawc/wc-codemirror/mode/javascript/javascript.js'
This fails because the original source tries to require('../../lib/codemirror').
While I would not like to modify all those mode modules, I propose to create dummy commonjs (sic!) module at that path so that webpack and possibly other bundler can import do their thing
It can be simply
module.exports = window.CodeMirror
Ugly but it works
I want to use wc-codemirror with webpack and it's not possible to import a mode
This fails because the original source tries to
require('../../lib/codemirror').While I would not like to modify all those mode modules, I propose to create dummy commonjs (sic!) module at that path so that webpack and possibly other bundler can import do their thing
It can be simply
Ugly but it works