const path = require('path');

function resolve(dir) {
    return path.join(__dirname, dir)
}
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
    configureWebpack:{
        plugins: [
            new CopyWebpackPlugin([{
                from: path.join(__dirname, 'agent_sub/wxcomponents'),
                to: path.join(__dirname, 'unpackage/dist', process.env.NODE_ENV === 'production' ? 'build' : 'dev',
                    'mp-weixin', 'agent_sub/wxcomponents')
            }])
        ]
    }
}
