const path = require('path');

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