import webpack from 'webpack';
import path from 'path';
import htmlWebpackPlugin from 'html-webpack-plugin';


export default {
    devtool: 'inline-source-map',
    entry: [
        path.resolve(__dirname, 'src/userExample/index')
    ],
    target: 'web',
    output: {
        path: path.resolve(__dirname, 'src/userExample'),
        publicPath: '/',
        filename: 'bundle.js'
    },
    plugins: [
        // Create HTML File that includes a reference to bundled JS
        new htmlWebpackPlugin({
            template: 'src/userExample/index.html',
            inject: true
        }),
        new webpack.LoaderOptionsPlugin({
            debug: true,
            noInfo: false,
        })
    ],
    module: {
        rules: [
            { test: /\.js$/, exclude: /node_modules/, loaders: ['babel-loader'] },
            { test: /\.css$/, loaders: ['style', 'css'] }
        ]
    }
}
