add new websocket topic - userList - and handle it
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var webpack = require("webpack");
|
||||
let webpack = require("webpack");
|
||||
process.env.NODE_ENV = 'production';
|
||||
var isProd = (process.env.NODE_ENV === 'production');
|
||||
let isProd = (process.env.NODE_ENV === 'production');
|
||||
|
||||
/**
|
||||
* Conditionally return a list of plugins to use based on the current environment.
|
||||
@@ -10,7 +10,7 @@ var isProd = (process.env.NODE_ENV === 'production');
|
||||
* @returns {Array}
|
||||
*/
|
||||
function getPlugins() {
|
||||
var plugins = [];
|
||||
let plugins = [];
|
||||
|
||||
/**
|
||||
* Always expose NODE_ENV to webpack, you can now use `process.env.NODE_ENV`
|
||||
@@ -33,10 +33,14 @@ function getPlugins() {
|
||||
return plugins;
|
||||
}
|
||||
|
||||
const config = module.exports = {
|
||||
const config = {
|
||||
module: {}
|
||||
};
|
||||
|
||||
let mineSeekerConfig = Object.assign({}, config, {
|
||||
entry: './web/bundles/mineseeker/js/mine-seeker.js',
|
||||
output: {
|
||||
path: './src/Mine/SeekerBundle/Resources/public/js',
|
||||
path: './src/Mine/SeekerBundle/Resources/public/js/build/mine-seeker/',
|
||||
filename: 'index.min.js'
|
||||
},
|
||||
module: {
|
||||
@@ -50,8 +54,30 @@ const config = module.exports = {
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: getPlugins()
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = config;
|
||||
let mineUserListConfig = Object.assign({}, config, {
|
||||
entry: './web/bundles/mineseeker/js/mine-user-list.js',
|
||||
output: {
|
||||
path: './src/Mine/SeekerBundle/Resources/public/js/build/mine-user-list/',
|
||||
filename: 'index.min.js'
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel',
|
||||
query: {
|
||||
presets: ['es2015', 'react']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
mineSeekerConfig,
|
||||
mineUserListConfig,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user