const path = require('path')

module.exports = {
    entry: {
        'wen-design': './lib/index.tsx'
    },
    resolve: {
        extensions: ['.ts', '.tsx', '.js', '.jsx'],
        alias: {
            icons: path.resolve(__dirname, 'icons'),
            utils: path.resolve(__dirname, 'utils'),
            lib: path.resolve(__dirname, 'lib')
        }
    },
    output: {
        path: path.resolve(__dirname, 'dist/lib'),
        library: 'wen-Design',
        libraryTarget: 'umd'
    },
    module: {
        rules: [
            {
                test: /\.tsx?$/,
                loader: 'awesome-typescript-loader'
            },
            {
                test: /\.svg$/,
                loader: 'svg-sprite-loader',
            },
            {
                test: /\.scss$/,
                use: ['style-loader', 'css-loader', 'sass-loader']
            },
            {
                test: /\.(png)$/,
                use: ['file-loader']
            }

        ]

    }
}