/*** webpack.config.js ***/
const path = require('path');

module.exports = {
    entry: path.join(__dirname, "index.js"),
    output: {
        path: path.join(__dirname, "/build"),
        filename: "bootstrap-core.bundle.js"
    },
    module: {
        rules: [

            {
                test: /\.js$|jsx/,
                // test: /\.js$/,
                use: "babel-loader",
                // exclude: /node_modules/
            },
            {
                test: /\.(s(a|c)ss)$/,
                use: ['css-loader', 'sass-loader'],
                // exclude: /node_modules/
            },
            {
                test: /\.(css)$/,
                use: ['css-loader'],
                // exclude: /node_modules/
            },

            {
                test: /\.tsx?$/,
                use: 'ts-loader',
                // exclude: /node_modules/,
            },

            {
                test: /\.(png|jpe?g|gif)$/i,
                use: [
                    {
                        loader: 'file-loader',
                    },
                ],
                // exclude: /node_modules/
            },

        ]
    },
    resolve: {
        extensions: [".js", ".tsx"]
    },
    devServer: {
        port: 5003
    }
};