mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
35 lines
641 B
JavaScript
35 lines
641 B
JavaScript
|
|
module.exports = {
|
|
entry: "./index.js",
|
|
output: {
|
|
filename: "engine.io.js",
|
|
library: "eio",
|
|
libraryTarget: "umd"
|
|
},
|
|
externals: {
|
|
global: glob()
|
|
},
|
|
module: {
|
|
loaders: [{
|
|
test: /\.js$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
loader: 'babel', // 'babel-loader' is also a legal name to reference
|
|
query: {
|
|
presets: ['es2015']
|
|
}
|
|
}]
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Populates `global`.
|
|
*
|
|
* @api private
|
|
*/
|
|
|
|
function glob() {
|
|
return 'typeof self !== "undefined" ? self : ' +
|
|
'typeof window !== "undefined" ? window : ' +
|
|
'typeof global !== "undefined" ? global : {}';
|
|
}
|