2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-06-19 22:50:34 +03:00
This commit is contained in:
metinseylan
2016-12-31 01:18:10 +03:00
parent c7491fc762
commit 8e0100be09
8 changed files with 143 additions and 86 deletions
Regular → Executable
+17 -36
View File
@@ -8,43 +8,24 @@ module.exports = {
library: ['VueSocketio'],
libraryTarget: 'umd'
},
resolveLoader: {
root: path.join(__dirname, 'node_modules'),
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
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"'
}
}),
devtool: "source-map",
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
])
}
})
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
}
]
}
}