Underscore gives error when bundling with Webpack
问题 I am trying to rewrite old application that uses require.js to use es6 imports. One of the used libraries are Backbone and Underscore. To create one big bundle and precompile es6 to es5, I use Webpack with babel-loader. Bundle gets created but when I load it in browser I am getting following error: Uncaught TypeError: Cannot read property '_' of undefined It seems that 'this' in Underscore is undefined in created bundle.js so root._ gives me error. // Baseline setup // -------------- //