const webpack = require('webpack');
const path = require('path');

const config = {
    entry: './src/index.js',
    output: {
        library: 'LHCVoiceCallAPP',
        libraryTarget: 'umd',
        libraryExport: 'default',
        path: path.resolve(__dirname, 'dist'),
        filename: 'voice.call.js',
        publicPath: "./",
        chunkFilename: "[name].[contenthash].js"
    },
    devtool: 'source-map',
    module: {
        rules: [
            {
                test: /\.(js|jsx)$/,
                use: 'babel-loader',
                exclude: /node_modules/
            }
        ]
    },
    resolve: {
        extensions: [
            '.js',
            '.jsx'
        ]
    },
    plugins: [
    ]
};

module.exports = config;