const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const baseWebpackConfig = require('./base.conf');

module.exports = merge(baseWebpackConfig, {
    entry: {
        main: './example/main.js',
        vendors: ['vue', 'vue-router']
    },
    output: {
        path: path.join(__dirname, './dist'),
        publicPath: '/dist/',
        filename: '[name].js'
    },
    productionSourceMap: true,
    devtool: '#cheap-source-map',
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendors.js' })
    ]
});