module.exports = {
    baseUrl: process.env.NODE_ENV === "production" ? "./" : "/",
    outputDir: process.env.outputDir,
    //assetsDir: 'static',
    configureWebpack: config => {
        if (process.env.NODE_ENV === "production") {
            // 为生产环境修改配置...
            config.externals = {
                vue: "Vue",
                vuex: "Vuex",
                "vue-router": "VueRouter",
                "element-ui": "ELEMENT",
                devtool: 'source-map'
            };
        } else {
            // 为开发环境修改配置...
            'source-map'
        }
        /*config.performance={
            hints:'warning',
            maxEntrypointSize:500000000,
            maxAssetSize:50000000,
            assetFilter:function (assetFilename){
                return assetFilename.endsWith('.js');
            }
        }*/
    },
    chainWebpack: config => {
        config.plugin("html").tap(args => {
            args[0].template = process.env.template;
            return args;
        });
    }
};
