-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Restore unminified distribution files (#1191)
- Loading branch information
1 parent
bb743c4
commit e27f38b
Showing
6 changed files
with
97 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
var webpack = require('webpack'); | ||
|
||
module.exports = { | ||
name: 'default', | ||
entry: './lib/index.js', | ||
output: { | ||
library: 'io', | ||
libraryTarget: 'umd', | ||
filename: 'socket.io.dev.js' | ||
}, | ||
externals: { | ||
global: glob() | ||
}, | ||
devtool: 'source-map', | ||
module: { | ||
loaders: [{ | ||
test: /\.js$/, | ||
exclude: /(node_modules|bower_components)/, | ||
loader: 'babel', // 'babel-loader' is also a legal name to reference | ||
query: { presets: ['es2015'] } | ||
}, { | ||
test: /\json3.js/, | ||
loader: 'imports?define=>false' | ||
}] | ||
} | ||
}; | ||
|
||
/** | ||
* Populates `global`. | ||
* | ||
* @api private | ||
*/ | ||
|
||
function glob () { | ||
return 'typeof self !== "undefined" ? self : ' + | ||
'typeof window !== "undefined" ? window : ' + | ||
'typeof global !== "undefined" ? global : {}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
var webpack = require('webpack'); | ||
|
||
module.exports = { | ||
name: 'slim', | ||
entry: './lib/index.js', | ||
output: { | ||
library: 'io', | ||
libraryTarget: 'umd', | ||
filename: 'socket.io.slim.dev.js' | ||
}, | ||
externals: { | ||
global: glob(), | ||
json3: 'JSON' | ||
}, | ||
devtool: 'source-map', | ||
plugins: [ | ||
new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/support/noop.js'), | ||
], | ||
module: { | ||
loaders: [{ | ||
test: /\.js$/, | ||
exclude: /(node_modules|bower_components)/, | ||
loader: 'babel', // 'babel-loader' is also a legal name to reference | ||
query: { presets: ['es2015'] } | ||
}, { | ||
test: /\json3.js/, | ||
loader: 'imports?define=>false' | ||
}, { | ||
test: /\.js$/, | ||
loader: 'strip-loader?strip[]=debug' | ||
}] | ||
} | ||
}; | ||
|
||
/** | ||
* Populates `global`. | ||
* | ||
* @api private | ||
*/ | ||
|
||
function glob () { | ||
return 'typeof self !== "undefined" ? self : ' + | ||
'typeof window !== "undefined" ? window : ' + | ||
'typeof global !== "undefined" ? global : {}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,14 @@ | ||
|
||
var webpack = require('webpack'); | ||
var merge = require('webpack-merge'); | ||
var baseConfig = require('./webpack.config.slim.dev.js') | ||
|
||
module.exports = { | ||
name: 'slim', | ||
entry: './lib/index.js', | ||
module.exports = merge(baseConfig, { | ||
output: { | ||
library: 'io', | ||
libraryTarget: 'umd', | ||
filename: 'socket.io.slim.js' | ||
}, | ||
externals: { | ||
global: glob(), | ||
json3: 'JSON' | ||
}, | ||
devtool: 'source-map', | ||
plugins: [ | ||
new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/support/noop.js'), | ||
new webpack.optimize.UglifyJsPlugin() | ||
], | ||
module: { | ||
loaders: [{ | ||
test: /\.js$/, | ||
exclude: /(node_modules|bower_components)/, | ||
loader: 'babel', // 'babel-loader' is also a legal name to reference | ||
query: { presets: ['es2015'] } | ||
}, { | ||
test: /\json3.js/, | ||
loader: 'imports?define=>false' | ||
}, { | ||
test: /\.js$/, | ||
loader: 'strip-loader?strip[]=debug' | ||
}] | ||
} | ||
}; | ||
|
||
/** | ||
* Populates `global`. | ||
* | ||
* @api private | ||
*/ | ||
|
||
function glob () { | ||
return 'typeof self !== "undefined" ? self : ' + | ||
'typeof window !== "undefined" ? window : ' + | ||
'typeof global !== "undefined" ? global : {}'; | ||
} | ||
}); |