vue-echo-laravel
Version:
It's a laravel/echo wrapper for Vue JS ^2.0. This Vue plugin injects a Laravel Echo instance into all of your vue instances, allowing for a simple channel subscription on each instance, or using Laravel Echo through this.$echo. It will be synced with late
46 lines (44 loc) • 1.15 kB
JavaScript
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: ['./vue-echo.js'],
output: {
path: path.resolve(__dirname, './dist'),
filename: 'build.js',
library: ['VueEcho'],
libraryTarget: 'umd'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
},
{
test: /\.json$/,
loader: 'json'
}
]
},
devtool: 'eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = 'source-map'
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurrenceOrderPlugin()
])
}