Bad require caused dependecy problem

I tried using CodeMirror with Webpack. The require statement get's resolved very bad in Webpack, causing Syntax errors. 
However i think ``require`` was used in a bad way here, and everything works fine if i change it like that.