I have several libraries written in es5, that is, they have no export directives. To connect them to my project I use require ('./source/safeframe/src/js/lib/base'); And everything seems to be working, but periodically errors like (data is not defined) appear in the browser console. If I simply connect the libraries through the <script src = ""> tag, then there are no errors, from which I assume that my assembly is incorrectly configured. Tell me what I'm doing wrong or what to read on this topic. thank
context: __dirname + "/src", entry: { index: "./index", }, output: { path: __dirname + "/build", filename: "[name].js", library: "[name]" }, watch: NODE_ENV == 'development', watchOptions: { aggregateTimeout: 100 }, devtool: NODE_ENV == 'development' ? "cheap-inline-module-source-map" : null, plugins: [ new webpack.NoEmitOnErrorsPlugin(), new webpack.DefinePlugin({ NODE_ENV: JSON.stringify(NODE_ENV), }), ], module: { loaders: [{ test: /\.js$/, loader: 'babel-loader?presets[]=es2015' }] } The libraries that I am trying to use https://sourceforge.net/projects/safeframes/files/