
// TODO:
// * bessere struktur
function resolve (dir) {
    return path.join(__dirname, '..', dir)
}

module.exports = {
    // the main entry of our app
    entry: ['./src/index.js', './src/auth/index.js'],
    // output configuration
    output: {
        path: __dirname + '/dist/',
        publicPath: 'assets/dist/'
    },
    resolve: {
        alias: {
            vue: 'vue/dist/vue.min.js'
        }
    },
    // how modules should be transformed
    module: {
        rules: [
            // process *.vue files using vue-loader
            {
                test: /\.vue$/,
                loader: 'vue-loader'
            },
            // process *.js files using babel-loader
            // the exclude pattern is important so that we don't
            // apply babel transform to all the dependencies!
            {
               /* test: /\.js$/,
                //exclude: /(node_modules)/,
                use: {
                    loader: 'babel-loader',
                    /*options: {
                        presets: ['@babel/preset-env']
                    }*
                }*/
                test: /\.js?$/,
                loader: 'babel-loader',
                query: {
                    presets: ['env']
                }
            }
        ]
    }
}
