Closed
Description
Describe the bug
Internet Explorer ES6 function not compiled, which comes from socket.io-parser
module a dependency of socket.io-client
.
I have been trying to force the compilation for this specific module, but babel-loader
can't reach it because I am not making a straight ES6 import of socket.io-parser
in my pages.
import parser from 'socket.io-parser'
otherwise I would have compiled this module easily :) But I need you to do it for me. And get a top notch module 🥇
function excludeNodeModulesExcept(modules) {
var pathSep = path.sep
if (pathSep == '\\')
// must be quoted for use in a regexp:
pathSep = '\\\\'
var moduleRegExps = modules.map(function(modName) {
return new RegExp('node_modules' + pathSep + modName)
})
return function(modulePath) {
if (/node_modules/.test(modulePath)) {
for (var i = 0; i < moduleRegExps.length; i++) if (moduleRegExps[i].test(modulePath)) return false
return true
}
return false
}
}
webpackRule = [
{
test: /\.(js|jsx|ts|tsx)$/,
exclude: excludeNodeModulesExcept(['query-string', 'socket.io-parser']),
loader: 'babel-loader'
}
]
Expected behavior
I want the javascript bundles to run on Internet Explorer 11, as simple as that.