Built motion from commit 76eb00b9e.|1.0.24
[motion.git] / public / bower_components / socket.io-client / support / webpack.config.slim.js
1
2 var webpack = require('webpack');
3
4 module.exports = {
5   name: 'slim',
6   entry: './lib/index.js',
7   output: {
8     library: 'io',
9     libraryTarget: 'umd',
10     filename: 'socket.io.slim.js'
11   },
12   externals: {
13     global: glob(),
14     json3: 'JSON'
15   },
16   devtool: 'cheap-module-source-map',
17   plugins: [
18     new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/support/noop.js')
19   ],
20   module: {
21     loaders: [{
22       test: /\.js$/,
23       exclude: /(node_modules|bower_components)/,
24       loader: 'babel', // 'babel-loader' is also a legal name to reference
25       query: { presets: ['es2015'] }
26     }, {
27       test: /\json3.js/,
28       loader: 'imports?define=>false'
29     }, {
30       test: /\.js$/,
31       loader: 'strip-loader?strip[]=debug'
32     }]
33   }
34 };
35
36 /**
37  * Populates `global`.
38  *
39  * @api private
40  */
41
42 function glob () {
43   return 'typeof self !== "undefined" ? self : ' +
44     'typeof window !== "undefined" ? window : ' +
45     'typeof global !== "undefined" ? global : {}';
46 }