const VueLoaderPlugin = require('vue-loader/lib/plugin');
const path = require('path');

module.exports = {
    mode: 'production',
    entry: {
        license: './admin/assets/js/license.js'
    },
    output: {
        filename: '[name].min.js',
        path: path.resolve(__dirname, 'dist')
    },
    module: {
        rules: [
            { test: /\.js$/, use: 'babel-loader',exclude: /(node_modules|bower_components)/ },
            { test: /\.vue$/, use: 'vue-loader' },
            {
                test: /\.styl$/,
                loader: ['style-loader', 'css-loader', 'stylus-loader']
            },
            {
                test: /\.css$/,
                use: [
                    'style-loader',
                    'css-loader',
                    'stylus-loader',
                ],
            },
            { test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: ['url-loader?limit=100000'] }
        ],
    },
    plugins: [
        new VueLoaderPlugin()
    ]
};