Added putputs for client and server

This commit is contained in:
euvl
2017-06-20 03:39:15 +01:00
parent 44cb64babc
commit dcf3291623
9 changed files with 74 additions and 1060 deletions

View File

@@ -0,0 +1,41 @@
const path = require('path')
const webpack = require('webpack')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
// "build:client": "cross-env NODE_ENV=production webpack --config ./build/webpack.client.config.js --progress --hide-modules",
module.exports = {
entry: path.resolve(__dirname, '../src/index.js'),
output: {
path: path.resolve(__dirname, '../dist'),
publicPath: '/dist/',
filename: 'index.js',
library:'VueJsModal',
libraryTarget: 'commonjs2'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
},
externals: {
vue: 'vue'
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
devtool: '#source-map',
plugins: [
new UglifyJSPlugin()
]
}