vue.config.js 504 Bytes
Newer Older
lanbaoming's avatar
lanbaoming committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
const path = require('path');  
const CopyWebpackPlugin = require('copy-webpack-plugin'); // 最新版本copy-webpack-plugin插件暂不兼容,推荐v5.0.0  

module.exports = {  
    configureWebpack: {  
        plugins: [  
			new CopyWebpackPlugin([  
				{  
					from: path.join(__dirname, 'public'),  
					to: path.join(  
						__dirname,  
						'dist',  
						process.env.NODE_ENV === 'production' ? 'build' : 'dev',  
						process.env.UNI_PLATFORM  
					)  
				}  
			])  
		]
    }  
}